Skip to content
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

Fix ifconfig parse logic failing on some tunnels #2635

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Woellchen
Copy link

Tunnel interfaces that have a line similar to
"tunnel inet 192.0.2.1 --> 192.0.2.2" would fail the network resolver
because IPs were extracted through two separate IP + mask patterns.
However, in the example above, there is no such thing as a netmask.

This fix merges the patterns and extracts the IPs and netmasks
together so that no mismatches can occur. It might also fix some
cases where only the netmask would be nil and therefore produce an
invalid binding that could in turn resolve to the wrong (outer) IP of
the tunnel instead of the inner IP.

@Woellchen Woellchen requested a review from a team as a code owner November 8, 2023 11:53
@puppetlabs-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@joshcooper joshcooper added the bug Something isn't working label Apr 11, 2024
Copy link
Contributor

@joshcooper joshcooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Woellchen! In the first commit that demonstrates the failure, can you mark the failing test(s) as pending? And then remove the pending in the second commit. This is important so that each commit passes if we later need to git bisect.

Or you can keep the commits as-is and I can squash them when merging. Let me know which sounds better.

@Woellchen Woellchen force-pushed the fix/main/fix_ifconfig_tunnel_parsing branch from 4c6519c to a83e1f9 Compare April 17, 2024 09:10
@Woellchen
Copy link
Author

Hey @joshcooper, thanks for getting back to me!
I see your point and I have marked the tests as pending in the first commit, and unmarked them in the following one.
Please check one more time if this looks good to you now :)

@joshcooper
Copy link
Contributor

Closing and reopening to trigger the right set of checks

@joshcooper joshcooper closed this Jul 26, 2024
@joshcooper joshcooper reopened this Jul 26, 2024
@Woellchen Woellchen force-pushed the fix/main/fix_ifconfig_tunnel_parsing branch from a83e1f9 to 8260822 Compare October 22, 2024 09:14
@Woellchen
Copy link
Author

Hey @joshcooper! To avoid further confusion and delays I have just merged the two commits into one and skipped the failing tests commit that was meant to demonstrate the failure. I have also rebased the branch once again. I hope that this way we can conclude this PR for good :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants