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 16:51:26 +0000 (18:51 +0200)
commit39da22d04a26946481c4c9e34aacfb8b8a705159
tree0ca11e6b385b1bebe2035d6c530b096b52684a5a
parent1c3233ca675828e59db6ca999d8deb59dd80f919
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]