]> git.ipfire.org Git - thirdparty/iproute2.git/commit
ip netconf: Show all address families by default in dumps
authorDavid Ahern <dsa@cumulusnetworks.com>
Fri, 24 Mar 2017 02:51:21 +0000 (19:51 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Fri, 14 Apr 2017 23:00:15 +0000 (16:00 -0700)
commitf052f5dfe0b87f31c95176611b7887802514208e
tree8ef4eb6eee42af82a83e66a70634d7262817e348
parent3ad6d176389d4157bf4146cfea41337f08cfa62f
ip netconf: Show all address families by default in dumps

Currently, 'ip netconf' only shows ipv4 and ipv6 netconf settings. If IPv6
is not enabled, the dump ends with
    RTNETLINK answers: Operation not supported

when IPv6 request is attempted. Further, if the mpls_router module is also
loaded a separate request is needed to get MPLS settings.

To make this better going forward, use the new PF_UNSPEC dump all option
if the kernel supports it. If the kernel does not, it sets NLMSG_ERROR and
returns EOPNOTSUPP which is trapped and we fall back to the existing output
to maintain compatibility with existing kernels.

Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
ip/ipnetconf.c