summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLaura Garcia Liebana <nevola@gmail.com>2018-05-21 19:12:11 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-05-23 09:42:39 +0200
commit17208cb344a22cc3da7ccc83a9f0b0456e947777 (patch)
tree6a0e93c8bb70abc576c5a92c00028f84bfbef21c /examples
parente73a16d1e8e98773a8e1cd838bb55720ec088576 (diff)
examples: fix neigh max attributes
Use NDA_MAX for neigh maximum attributes instead of IFA_MAX, which is only for interfaces. Signed-off-by: Laura Garcia Liebana <nevola@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/rtnl/rtnl-neigh-dump.c4
1 files 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);