Your message dated Thu, 31 Dec 2020 17:12:37 +0000
with message-id 
<CAMw=znrz7susz3q0bvkvgac3fn4z_a1hneupn+x28lnr4ee...@mail.gmail.com>
and subject line Re: ip route json output invalid in Buster (fixed upstream)
has caused the Debian Bug report #961278,
regarding ip route json output invalid in Buster (fixed upstream)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
961278: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961278
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: iproute2
Version: 4.20.0-2
Tags: patch

ip route in Buster generates an invalid JSON if the route type has to
be printed,
eg. when detailed mode is active, or the type is different that unicast:

    $ ip -d -j -p route show
    [ {"unicast",
            "dst": "192.168.122.0/24",
            "dev": "virbr0",
            "protocol": "kernel",
            "scope": "link",
            "prefsrc": "192.168.122.1",
            "flags": [ "linkdown" ]
        } ]

    $ ip -j -p route show
    [ {"unreachable",
            "dst": "192.168.23.0/24",
            "flags": [ ]
        },{"prohibit",
            "dst": "192.168.24.0/24",
            "flags": [ ]
        },{"blackhole",
            "dst": "192.168.25.0/24",
            "flags": [ ]
        } ]

Fix it by printing the route type as the "type" attribute:

    $ ip -d -j -p route show
    [ {
            "type": "unicast",
            "dst": "default",
            "gateway": "192.168.85.1",
            "dev": "wlp3s0",
            "protocol": "dhcp",
            "scope": "global",
            "metric": 600,
            "flags": [ ]
    } ]


Small upstream fix is available since March 2019:
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=073661773872709518d35d4d093f3a715281f21d

This bug renders the json output in Debian Buster unusable which is a
bad problem for my system that wants to parse it.

Best regards,
Oskar

--- End Message ---
--- Begin Message ---
Control: fixed -1 5.0.0-1

Fixed in upstream version 5.0.0. Will be fixed in the next buster
stable release.

--- End Message ---

Reply via email to