Skip to content

ip r a via no longer works #45

Description

@arekm

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.

Activity

  1. brona commented on Sep 27, 2022

    @brona
    Owner

    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?

  2. arekm commented on Sep 27, 2022

    @arekm
    Author

    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)

  3. brona commented on Dec 3, 2023

    @brona
    Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions