batman-adv: Always send iface index+name in genlmsg
authorSven Eckelmann <sven@narfation.org>
Fri, 14 May 2021 17:38:53 +0000 (19:38 +0200)
committerSven Eckelmann <sven@narfation.org>
Tue, 18 May 2021 17:17:19 +0000 (19:17 +0200)
commit5d09821ed7c43901a5564608a20f8c78bf623f83
treec65bfefd0061472b223f117c7518a637b6bd0e38
parent9c2452c407c0a53cdcb7775e656ed0260adf9f23
batman-adv: Always send iface index+name in genlmsg

The batman-adv netlink messages often contain the interface index and
interface name in the same message. This makes it easy for the receiver to
operate on the incoming data when it either needs to print something or
needs to operate on the interface index.

But one of the attributes was missing for:

* neighbor table dumps
* originator table dumps
* gateway list dumps
* query of hardif information
* query of vid information

The userspace therefore had to implement special workarounds using
SIOCGIFNAME or SIOCGIFINDEX depending on what was actually provided.
Providing both information simplifies the userspace code massively without
adding a lot of extra overhead in the kernel portion.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
batman-adv/patches/0004-batman-adv-Always-send-iface-index-name-in-genlmsg.patch [new file with mode: 0644]