[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0e475b1e-7a4a-753a-85b1-9dd051313ccc@gmail.com>
Date: Mon, 29 Jul 2019 14:57:36 -0600
From: David Ahern <dsahern@...il.com>
To: Michael Ziegler <ich@...haelziegler.name>, netdev@...r.kernel.org
Subject: Re: ip route JSON format is unparseable for "unreachable" routes
On 7/28/19 5:09 AM, Michael Ziegler wrote:
> Hi,
>
> I created a couple "unreachable" routes on one of my systems, like such:
>
>> ip route add unreachable 10.0.0.0/8 metric 255
>> ip route add unreachable 192.168.0.0/16 metric 255
>
> Unfortunately this results in unparseable JSON output from "ip":
>
>> # ip -j route show | jq .
>> parse error: Objects must consist of key:value pairs at line 1, column 84
>
> The offending JSON objects are these:
>
>> {"unreachable","dst":"10.0.0.0/8","metric":255,"flags":[]}
>> {"unreachable","dst":"192.168.0.0/16","metric":255,"flags":[]}
> "unreachable" cannot appear on its own here, it needs to be some kind of
> field.
>
> The manpage says to report here, thus I do :) I've searched the
> archives, but I wasn't able to find any existing bug reports about this.
> I'm running version
>
it's a problem printing the route type in general - any route not of
type 'unicast'. I will send a patch
Powered by blists - more mailing lists