lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 1 Nov 2019 09:37:05 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     David Ahern <dsahern@...il.com>
Cc:     Andrea Claudi <aclaudi@...hat.com>, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] ip-route: fix json formatting for multipath
 routing

On Thu, 31 Oct 2019 10:11:23 -0600
David Ahern <dsahern@...il.com> wrote:

> On 10/31/19 9:09 AM, Andrea Claudi wrote:
> > json output for multipath routing is broken due to some non-jsonified
> > print in print_rta_multipath(). To reproduce the issue:
> > 
> > $ ip route add default \
> >   nexthop via 192.168.1.1 weight 1 \
> >   nexthop via 192.168.2.1 weight 1
> > $ ip -j route | jq
> > parse error: Invalid numeric literal at line 1, column 58
> > 
> > Fix this opening a "multipath" json array that can contain multiple
> > route objects, and using print_*() instead of fprintf().
> > 
> > This is the output for the above commands applying this patch:
> > 
> > [
> >   {
> >     "dst": "default",
> >     "flags": [],
> >     "multipath": [
> >       {
> >         "gateway": "192.168.1.1",
> >         "dev": "wlp61s0",
> >         "weight": 1,
> >         "flags": [
> >           "linkdown"
> >         ]
> >       },
> >       {
> >         "gateway": "192.168.2.1",
> >         "dev": "ens1u1",
> >         "weight": 1,
> >         "flags": []
> >       }
> >     ]
> >   }
> > ]
> > 
> > Fixes: f48e14880a0e5 ("iproute: refactor multipath print")
> > Signed-off-by: Andrea Claudi <aclaudi@...hat.com>
> > Reported-by: Patrick Hagara <phagara@...hat.com>
> > ---
> >  ip/iproute.c | 23 +++++++++++++++++------
> >  1 file changed, 17 insertions(+), 6 deletions(-)
> >   
> 
> This is fixed -next by 4ecefff3cf25 ("ip: fix ip route show json output
> for multipath nexthops"). Stephen can cherry pick it for master

Sure, cherry-picked the other commit (it was clean)

Powered by blists - more mailing lists