[PATCH libmnl 1/3] examples: fix neigh max attributes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use NDA_MAX for neigh maximum attributes instead of IFA_MAX,
which is only for interfaces.

Signed-off-by: Laura Garcia Liebana <nevola@xxxxxxxxx>
---
 examples/rtnl/rtnl-neigh-dump.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/examples/rtnl/rtnl-neigh-dump.c b/examples/rtnl/rtnl-neigh-dump.c
index fc0f205..52fa1c7 100644
--- a/examples/rtnl/rtnl-neigh-dump.c
+++ b/examples/rtnl/rtnl-neigh-dump.c
@@ -17,7 +17,7 @@ static int data_attr_cb(const struct nlattr *attr, void *data)
 	int type = mnl_attr_get_type(attr);
 
 	/* skip unsupported attribute in user-space */
-	if (mnl_attr_type_valid(attr, IFA_MAX) < 0)
+	if (mnl_attr_type_valid(attr, NDA_MAX) < 0)
 		return MNL_CB_OK;
 
 	switch(type) {
@@ -40,7 +40,7 @@ static int data_attr_cb(const struct nlattr *attr, void *data)
 
 static int data_cb(const struct nlmsghdr *nlh, void *data)
 {
-	struct nlattr *tb[IFA_MAX + 1] = {};
+	struct nlattr *tb[NDA_MAX + 1] = {};
 	struct ndmsg *ndm = mnl_nlmsg_get_payload(nlh);
 
 	printf("index=%d family=%d ", ndm->ndm_ifindex, ndm->ndm_family);
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux