summaryrefslogtreecommitdiffstats
path: root/net/batman-adv/netlink.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-07-03 13:31:45 +0200
committerSimon Wunderlich <sw@simonwunderlich.de>2016-08-09 07:54:42 +0200
commit04f3f5bf1883fbe0acba5c1fc698cf5cedebc5c5 (patch)
tree2241700de70fa67a681f843e2af2d7d90d60980c /net/batman-adv/netlink.c
parentbatman-adv: add B.A.T.M.A.N. V bat_gw_dump implementations (diff)
downloadlinux-04f3f5bf1883fbe0acba5c1fc698cf5cedebc5c5.tar.xz
linux-04f3f5bf1883fbe0acba5c1fc698cf5cedebc5c5.zip
batman-adv: add B.A.T.M.A.N. Dump BLA claims via netlink
Dump the list of bridge loop avoidance claims via the netlink socket. Signed-off-by: Andrew Lunn <andrew@lunn.ch> [sven.eckelmann@open-mesh.com: add policy for attributes, fix includes, fix soft_iface reference leak] Signed-off-by: Sven Eckelmann <sven.eckelmann@open-mesh.com> [sw@simonwunderlich.de: fix kerneldoc, fix error reporting] Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Diffstat (limited to 'net/batman-adv/netlink.c')
-rw-r--r--net/batman-adv/netlink.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/batman-adv/netlink.c b/net/batman-adv/netlink.c
index c68ccb03634d..b33675cbaecf 100644
--- a/net/batman-adv/netlink.c
+++ b/net/batman-adv/netlink.c
@@ -38,6 +38,7 @@
#include <uapi/linux/batman_adv.h>
#include "bat_algo.h"
+#include "bridge_loop_avoidance.h"
#include "gateway_client.h"
#include "hard-interface.h"
#include "originator.h"
@@ -91,6 +92,11 @@ static struct nla_policy batadv_netlink_policy[NUM_BATADV_ATTR] = {
[BATADV_ATTR_BANDWIDTH_UP] = { .type = NLA_U32 },
[BATADV_ATTR_BANDWIDTH_DOWN] = { .type = NLA_U32 },
[BATADV_ATTR_ROUTER] = { .len = ETH_ALEN },
+ [BATADV_ATTR_BLA_OWN] = { .type = NLA_FLAG },
+ [BATADV_ATTR_BLA_ADDRESS] = { .len = ETH_ALEN },
+ [BATADV_ATTR_BLA_VID] = { .type = NLA_U16 },
+ [BATADV_ATTR_BLA_BACKBONE] = { .len = ETH_ALEN },
+ [BATADV_ATTR_BLA_CRC] = { .type = NLA_U16 },
};
/**
@@ -580,6 +586,12 @@ static struct genl_ops batadv_netlink_ops[] = {
.policy = batadv_netlink_policy,
.dumpit = batadv_gw_dump,
},
+ {
+ .cmd = BATADV_CMD_GET_BLA_CLAIM,
+ .flags = GENL_ADMIN_PERM,
+ .policy = batadv_netlink_policy,
+ .dumpit = batadv_bla_claim_dump,
+ },
};
/**