batman-adv: Ignore invalid batadv_iv_gw during netlink send
authorSven Eckelmann <sven.eckelmann@openmesh.com>
Mon, 19 Feb 2018 13:08:52 +0000 (14:08 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Sun, 25 Feb 2018 19:10:30 +0000 (20:10 +0100)
commit10d570284258a30dc104c50787c5289ec49f3d23
tree49f01734d7216d9aae73df795bf483e445261a76
parent3bf2a09da956b43ecfaa630a2ef9a477f991a46a
batman-adv: Ignore invalid batadv_iv_gw during netlink send

The function batadv_iv_gw_dump stops the processing loop when
batadv_iv_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: efb766af06e3 ("batman-adv: add B.A.T.M.A.N. IV 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_iv_ogm.c