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

Fails to get default route on current after Nov 26 (patch included) #60

Open
netchild opened this issue Jan 27, 2025 · 7 comments · May be fixed by #61
Open

Fails to get default route on current after Nov 26 (patch included) #60

netchild opened this issue Jan 27, 2025 · 7 comments · May be fixed by #61
Assignees
Milestone

Comments

@netchild
Copy link
Member

Reason: commit 9206c79961986c2114a9a2cfccf009ac010ad259

netstat - rn prints 0.0.0.0/0 or ::/0 instead of "default" now.

See also https://reviews.freebsd.org/D10320

@netchild
Copy link
Member Author

netchild commented Jan 27, 2025

This fixes it for pre change and post change:

--- ioc_common.py.orig  2025-01-27 20:33:31.225131000 +0100
+++ ioc_common.py       2025-01-27 20:33:53.383169000 +0100
@@ -1116,7 +1116,7 @@
             pass
         else:
             default_route = list(filter(
-                lambda x: x['destination'] == 'default', route_entries)
+                lambda x: (x['destination'] == 'default' or x['destination'] == '0.0.0.0' or x['destination'] == '::/0'), route_entries)
             )
             if default_route and 'gateway' in default_route[0]:
                 gateways[af_mapping[af]]['gateway'] = \

@netchild netchild changed the title Fails to get default route on current after Nov 26 Fails to get default route on current after Nov 26 (patch included) Jan 27, 2025
@grembo
Copy link
Contributor

grembo commented Jan 27, 2025

Wow - that review was stale for some 5+ years. Curious what else breaks due to that.

grembo added a commit to grembo/iocage that referenced this issue Jan 27, 2025
@grembo grembo linked a pull request Jan 27, 2025 that will close this issue
2 tasks
grembo added a commit to grembo/iocage that referenced this issue Jan 27, 2025
grembo added a commit to grembo/iocage that referenced this issue Jan 27, 2025
@grembo
Copy link
Contributor

grembo commented Jan 27, 2025

@netchild Thank you for the patch, I opened a pull request that implements the same in a very slightly different fashion and will also apply that to the port.

@leres
Copy link

leres commented Jan 27, 2025

- lambda x: x['destination'] == 'default', route_entries)
+ lambda x: (x['destination'] == 'default' or x['destination'] == '0.0.0.0' or x['destination'] == '::/0'), route_entries)

Huh. I would have done it this way:

-                lambda x: x['destination'] == 'default', route_entries)
+                lambda x: x['destination'] in ('default', '0.0.0.0', '::/0'), route_entries)

@grembo
Copy link
Contributor

grembo commented Jan 27, 2025

@leres see #61

@leres
Copy link

leres commented Jan 27, 2025

@leres see #61

(Even better!)

@dgeo dgeo added this to the next milestone Jan 28, 2025
@dgeo
Copy link
Contributor

dgeo commented Jan 28, 2025

Thank you all !
@grembo I have no current here to test, can you merge this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants