-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clustermesh: fix pattern to match IPv4 address #2144
clustermesh: fix pattern to match IPv4 address #2144
Conversation
Executing `cilium clustermesh vm install install-external-workload.sh` fails if the randomly generated IP (v4) contains a zero (`0`) in its first byte. Error: `Malformed CLUSTER_ADDR: 104.198.85.126:2379` Therefore, this commit changes the pattern that is used to detect an IPv4 address (with port). Signed-off-by: Marco Hofstetter <[email protected]>
I wanted to understand that before approving as it was not obvious to me as well. I simplified the case to:
output:
So what happens is that Looks like we also accept the |
Thanks @marseel I think you meant Now that this is clear, the reason for this might have been to prevent matching any ipv6 address (without |
yea, sorry for that.
I don't think it's necessary either. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a very innocent regex
Executing
cilium clustermesh vm install install-external-workload.sh
fails if the randomly generated IP (v4) contains a zero (0
) in its first byte.Error:
Malformed CLUSTER_ADDR: 104.198.85.126:2379
Therefore, this commit changes the pattern that is used to detect an IPv4 address (with port).
Until now i don't understand why it's working with the prefix
[^[]
for all other cases but not if the first byte is containing a zero 🤷♂️ I just think that this part isn't necessary - and shouldn't break anything 🙏Detected on a cilium/cilium CI run: https://github.com/cilium/cilium/actions/runs/7067930793/job/19241908576