* libmnl [PATCH 1/5] examples: set attr table
@ 2013-12-05 10:16 Ken-ichirou MATSUZAWA
2013-12-05 14:15 ` Florian Westphal
0 siblings, 1 reply; 2+ messages in thread
From: Ken-ichirou MATSUZAWA @ 2013-12-05 10:16 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter-devel
From: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
Date: Thu, 7 Nov 2013 16:45:41 +0900
Subject: [PATCH 1/5] examples: set attr table
---
examples/rtnl/rtnl-route-dump.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/examples/rtnl/rtnl-route-dump.c b/examples/rtnl/rtnl-route-dump.c
index 59e0a9d..33cb2df 100644
--- a/examples/rtnl/rtnl-route-dump.c
+++ b/examples/rtnl/rtnl-route-dump.c
@@ -13,6 +13,8 @@
static int data_attr_cb2(const struct nlattr *attr, void *data)
{
+ const struct nlattr **tb = data;
+
/* skip unsupported attribute in user-space */
if (mnl_attr_type_valid(attr, RTAX_MAX) < 0)
return MNL_CB_OK;
@@ -21,6 +23,8 @@ static int data_attr_cb2(const struct nlattr *attr,
void *data)
perror("mnl_attr_validate");
return MNL_CB_ERROR;
}
+
+ tb[mnl_attr_get_type(attr)] = attr;
return MNL_CB_OK;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: libmnl [PATCH 1/5] examples: set attr table
2013-12-05 10:16 libmnl [PATCH 1/5] examples: set attr table Ken-ichirou MATSUZAWA
@ 2013-12-05 14:15 ` Florian Westphal
0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2013-12-05 14:15 UTC (permalink / raw)
To: Ken-ichirou MATSUZAWA; +Cc: Pablo Neira Ayuso, netfilter-devel
Ken-ichirou MATSUZAWA <chamaken@gmail.com> wrote:
> From: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
> Date: Thu, 7 Nov 2013 16:45:41 +0900
> Subject: [PATCH 1/5] examples: set attr table
>
> ---
> examples/rtnl/rtnl-route-dump.c | 4 ++++
> 1 file changed, 4 insertions(+)
Looks correct, thanks!
Would you mind reviewing the other examples as well?
examples/rtnl/rtnl-route-event.c seems to have similar problem.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-05 14:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-05 10:16 libmnl [PATCH 1/5] examples: set attr table Ken-ichirou MATSUZAWA
2013-12-05 14:15 ` Florian Westphal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.