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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 31 Oct 2019 10:11:23 -0600
From:   David Ahern <dsahern@...il.com>
To:     Andrea Claudi <aclaudi@...hat.com>, netdev@...r.kernel.org
Cc:     stephen@...workplumber.org
Subject: Re: [PATCH iproute2] ip-route: fix json formatting for multipath
 routing

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ