]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Ignore invalid batadv_v_gw during netlink send
authorSven Eckelmann <sven.eckelmann@openmesh.com>
Mon, 19 Feb 2018 13:08:53 +0000 (14:08 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sun, 25 Feb 2018 19:11:11 +0000 (20:11 +0100)
commit2a9c9435e144a68e7f3bf8d4f0b054e68b027652
treeae02734ad65de9e9574345688fd4bdff9547d9fe
parentf2b9f0e4e499269c6ba82e355b354f6cd22c2dde
batman-adv: Ignore invalid batadv_v_gw during netlink send

The function batadv_v_gw_dump stops the processing loop when
batadv_v_gw_dump_entry returns a non-0 return code. This should only
happen when the buffer is full. Otherwise, an empty message may be
returned by batadv_gw_dump. This empty message will then stop the netlink
dumping of gateway entries. At worst, not a single entry is returned to
userspace even when plenty of possible gateways exist.

Fixes: a93ec29ac948 ("batman-adv: add B.A.T.M.A.N. V bat_gw_dump implementations")
Signed-off-by: Sven Eckelmann <sven.eckelmann@openmesh.com>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/bat_v.c