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

ip r a via no longer works #45

Closed
arekm opened this issue Sep 26, 2022 · 3 comments
Closed

ip r a via no longer works #45

arekm opened this issue Sep 26, 2022 · 3 comments
Labels

Comments

@arekm
Copy link

arekm commented Sep 26, 2022

1.4.1:

# ip r a 1.1.1.1 via 2.2.2.2 dev utun5
Usage: ip route list
       ip route get ADDRESS
       ip route { add | del | replace } ROUTE
       ip route flush cache
       ip route flush table main
ROUTE := NODE_SPEC [ INFO_SPEC ]
NODE_SPEC := [ TYPE ] PREFIX
INFO_SPEC := NH
TYPE := { blackhole }
NH := { via ADDRESS | gw ADDRESS | nexthop ADDRESS | dev STRING }

I think it worked before.

@brona
Copy link
Owner

brona commented Sep 27, 2022

Thanks for reporting the issue, I don't think this worked before. The implemented logic as-is, allows either IP address nexthop or dev nexthop, not both.

I can look into it, but probably not anytime soon. Out of curiosity why do you have to specify both in your setup?

@arekm
Copy link
Author

arekm commented Sep 27, 2022

Did bisect. It worked until

commit 4bd9c42dbf58bb5bc4edc46088cdc2901a086f86 (refs/bisect/bad)
Author: Brona <brona@robenek.me>
Date:   Sun Mar 20 21:57:14 2022 +0100

    Fix blackhole routes and minor clean up

but "worked" means it didn't throw error only

% ./src/ip.py r a 1.1.1.1 via 2.2.2.2 dev xxx
Executing: /usr/bin/sudo /sbin/route add 1.1.1.1 2.2.2.2

I don't need this on this setup (and didn't notice that dev xxx was just ignored earlier).
I was using this on Linux commonly though.

(such way can be needed when the same IP is reachable thru multiple interfaces)

@brona
Copy link
Owner

brona commented Dec 3, 2023

Fixed in 228e3e0, will be part of the next release.

@brona brona closed this as completed Dec 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants