Skip to content

Conversation

@IDisposable
Copy link
Contributor

While trying to figure out why the IP routing gets messed up after a lot of DHCP (or even static) changes, discovered that the gateway routes were not being correctly updated.

Added a lot more logging detail to find the route bugs which was that the gateways were being added to the map of things to update with their IP and netmask, then looked for by only the IP, which meant we never removed them.

Also replaced log context additions that did .Str("foo", foo.String()) with .Stringer("foo", foo) so the conversion to string is lazy and not done if the log level would result in the Msg() being dropped.

Added a lot more logging detail to find the route bugs which was that the gateways were being added to the map with their IP and netmask, then looked for by only the IP, which meant we never removed them.
Replace log context additions that did .Str("foo", foo.String()) with .Stringer("foo", foo) so the conversion to string is lazy.
@IDisposable IDisposable changed the title When adding/removing routes, honor scope and protocol When adding/removing routes, honor scope and protocol and manage gateways correctly Nov 20, 2025
@IDisposable IDisposable requested a review from ym November 20, 2025 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants