]> git.proxmox.com Git - mirror_iproute2.git/commit
ip/iptoken: fix dump error when ipv6 disabled
authorHangbin Liu <liuhangbin@gmail.com>
Wed, 26 Jun 2019 01:44:07 +0000 (09:44 +0800)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 26 Jun 2019 21:23:12 +0000 (14:23 -0700)
commit5a403866f3691e1c2a1b7c7b677e9a7feeec0aa2
tree9ff4da6ac1fa4b518daf0084d1d519006505dab8
parentf7995053724f1ecd5912ed11026a65f90f2a1f58
ip/iptoken: fix dump error when ipv6 disabled

When we disable IPv6 from the start up (ipv6.disable=1), there will be
no IPv6 route info in the dump message. If we return -1 when
ifi->ifi_family != AF_INET6, we will get error like

$ ip token list
Dump terminated

which will make user feel confused. There is no need to return -1 if the
dump message not match. Return 0 is enough.

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/iptoken.c