Skip to content

fix(IP): The IP() function breaks for 128/8 and higher - #4827

Merged
TomOnTime merged 5 commits into
mainfrom
tlim_b4825_ipaddr
Aug 28, 2026
Merged

TomOnTime merged 5 commits into
mainfrom
tlim_b4825_ipaddr

Conversation

@TomOnTime

Copy link
Copy Markdown
Collaborator

Fixes #4825

IP(foo) doesn't work properly if "foo" is an IP address 128.0.0.0/8 and higher. That is, if the first octet has the high bit set.

IP("135.181.247.240") produces 127.255.255.255

@TomOnTime
TomOnTime requested a review from cafferata as a code owner August 28, 2026 15:06
@TomOnTime

Copy link
Copy Markdown
Collaborator Author

CC @mindsolve for visibility.

@TomOnTime
TomOnTime merged commit cffd094 into main Aug 28, 2026
39 checks passed
@TomOnTime
TomOnTime deleted the tlim_b4825_ipaddr branch August 28, 2026 15:41
TomOnTime added a commit that referenced this pull request Sep 19, 2026
…ple (#4904)

Follow-up to #4827. While going through the bug fix pull requests, I
noticed that the new "Debug `helpers.js`" section in
`documentation/advanced-features/debugging-with-dlv.md` reads
`helpers.js` from
`/Users/tlimoncelli/gitthings/dnscontrol/pkg/js/helpers.js`, a path that
only exists on one machine. Its two code blocks also have no language,
unlike the other blocks on the page, and the second one starts with a
`$` prompt, so copying it doesn't work as is.

This GitHub pull request changes the path to `pkg/js/helpers.js`, notes
that the command runs from the root of the repository, marks both blocks
as `shell` and removes the `$` prompt. I ran the updated command from
the repository root and it prints `2276849648` for
`IP('135.181.247.240')`.

## AI-attributie

Assisted-by: Claude Code:claude-opus-5

Co-authored-by: Tom Limoncelli <tal@whatexit.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

IP converted to "128.0.0.0" starting in v5.0.0?

1 participant