]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitaf1be660d3c49cb09f9a1e622eba7042ddecb2f1
tree49f01734d7216d9aae73df795bf483e445261a76
parent3a50c90c6960e0522b5ad2a2773ccf64c24fb263
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: 56bd31717b5e ("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