<div dir="ltr">I'll send over another set of changes shortly that refactors display_routes to use netlink. The changes will probably be controversial as they increase code size a bit but were useful for me to understand rtnetlink a bit better. They also setup another set of patches which unify display_route to support both ipv4 and ipv6 as well as to start refactoring the rest of route.c to use rtnetlink. <div><br></div><div>- Eric</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, May 17, 2020 at 12:17 AM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 5/16/20 5:39 AM, Eric Molitor wrote:<br>
> ---<br>
> toys/pending/route.c | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> <br>
> diff --git a/toys/pending/route.c b/toys/pending/route.c<br>
> index 1fd3b55f..b4e7ea0d 100644<br>
> --- a/toys/pending/route.c<br>
> +++ b/toys/pending/route.c<br>
> @@ -17,7 +17,7 @@ config ROUTE<br>
> bool "route"<br>
> default n<br>
> help<br>
> - usage: route [-ne] [-A [46]] [add|del TARGET [OPTIONS]]<br>
> + usage: route [-ne] [-A [inet|inet6]] [add|del TARGET [OPTIONS]]<br>
> <br>
> Display, add or delete network routes in the "Forwarding Information Base".<br>
<br>
Sigh. The ping stuff isn't two completely unrelated codepaths to support ipv6,<br>
it autodetects based on the address you specify, and only lets you specify to<br>
force name lookups to use a category when there are multiple responses (and<br>
abort when it hasn't got that type).<br>
<br>
And yes, I tested "ping -I 127.0.0.1 ::1" and such first thing:<br>
<br>
<a href="https://landley.net/notes-2017.html#16-07-2017" rel="noreferrer" target="_blank">https://landley.net/notes-2017.html#16-07-2017</a><br>
<br>
(And doing proper tests/ping.test is one of the things I hope "make root tests"<br>
lets me do...)<br>
<br>
Applied, but there are a number of reasons route is still in pending and this<br>
doesn't move it _towards_ getting out. :)<br>
<br>
Rob<br>
</blockquote></div>