Skip to content

Conversation

@luigidellaquila
Copy link
Contributor

Manual backport of #126532

Modifies TO_IP so it can handle leading `0`s in ipv4s. Here's how it
works now:
```
ROW ip = TO_IP("192.168.0.1") // OK!
ROW ip = TO_IP("192.168.010.1") // Fails
```

This adds
```
ROW ip = TO_IP("192.168.010.1", {"leading_zeros": "octal"})
ROW ip = TO_IP("192.168.010.1", {"leading_zeros": "decimal"})
```

We do this because there isn't a consensus on how to parse leading zeros
in ipv4s. The standard unix tools like `ping` and `ftp` interpret
leading zeros as octal. Java's built in ip parsing interprets them as
decimal. Because folks are using this for security rules we need to
support all the choices.

Closes elastic#125460
@luigidellaquila luigidellaquila added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) and removed v8.19.0 labels Jun 19, 2025
@elasticsearchmachine elasticsearchmachine merged commit 07dfcde into elastic:8.19 Jun 19, 2025
22 checks passed
@luigidellaquila luigidellaquila deleted the backport_126532 branch June 19, 2025 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants