* libmnl [PATCH 3/8] examples: use mnl_nlmsg_get_payload()
@ 2013-12-07 11:24 Ken-ichirou MATSUZAWA
0 siblings, 0 replies; only message in thread
From: Ken-ichirou MATSUZAWA @ 2013-12-07 11:24 UTC (permalink / raw)
To: netfilter-devel; +Cc: Pablo Neira Ayuso
not increment (nlmsghdr) pointer
Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
---
examples/netfilter/nfct-create-batch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/netfilter/nfct-create-batch.c b/examples/netfilter/nfct-create-batch.c
index 40cd2f6..a232991 100644
--- a/examples/netfilter/nfct-create-batch.c
+++ b/examples/netfilter/nfct-create-batch.c
@@ -67,7 +67,7 @@ static void put_msg(char *buf, uint16_t i, int seq)
static int cb_err(const struct nlmsghdr *nlh, void *data)
{
- struct nlmsgerr *err = (void *)(nlh + 1);
+ struct nlmsgerr *err = (void *)mnl_nlmsg_get_payload(nlh);
if (err->error != 0)
printf("message with seq %u has failed: %s\n",
nlh->nlmsg_seq, strerror(-err->error));
--
1.8.4.rc3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-07 11:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-07 11:24 libmnl [PATCH 3/8] examples: use mnl_nlmsg_get_payload() Ken-ichirou MATSUZAWA
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).