ip route show: show pretty routes #1369
Comments
seems like a change around fmt printing ? |
Pretty much, except we don't even parse the info in the first place: Line 213 in 57a97d8 |
I'd be interested in taking this for fun ... seems a good start for newbie /assign xuehaohu ? |
we have some working code for this, will ask my colleague to clean it up. IIRC Marcello also had some code for this, I'll ping him on Slack so we don't duplicate work |
as an additional note, we are moving away from vishvananda/netlink in favour of jsimonetti/rtnetlink/rtnl (safer, smaller) |
yeah i already started to work on it. #1354 There will be a WIP PR soon with the current progress |
Make it two PRs. Showing the route has nothing to do with changing the netlink lib. |
I need this for a demo next week, and my colleague's work is only for IPv6 routes, so I went ahead and created #1379 . However this is based on /proc/net/route like the original code, which does not provide as much information as rtnetlink. A better PR can come later |
CC @sylvblck |
I didn't reload the browser and didn't see @hugelgupf 's and @sylvblck 's replies until now. How about #1379 as a stop-gap until @sylvblck 's change is completed? |
I rebased and reopened #1354 |
@sylvblck mind sharing some local test setup ? - I can pick up the ipv6 implementation since it is related to my current work |
I think the local test setup is... run it on your friendly local Linux machine (e.g. run it on your workstation and compare to system's ip route show...) for the moment. |
ah.. ok! - |
@10000TB I'm using libvirt with |
i ill be interested in checkout out the post to come not familiar with the libvirt - but sounds like you are starting vms per configs, and run ip cmd within vms to verify if they match what is in configs if setup is checked in repo, it would be super helpful |
Trying to find inspiration for ipv6 implementation, so far I found this https://github.com/shemminger/iproute2/blob/master/ip/iproute.c#L1691 - still reading and digesting but meanwhile want to post it here and see if more experienced people have any other suggestion |
Actually, I think @sylvblck's patchset is probably better inspiration for v6 than the C code: you should be able to call |
noted |
being dead on this for so long, trying to recollect and pick up original promises as I am coming back to work on network boot stuff ... Fair to close this issue ? per #1354 |
It's a bit of a pain to have to interpret these yourself:
versus on real system:
we can do something inbetween. at least display the IPs correctly, and decipher the flags.
The text was updated successfully, but these errors were encountered: