netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ken-ichirou MATSUZAWA <chamaken@gmail.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: [PATCH libnetfilter_conntrack] conntrack: fix parsing payload len
Date: Thu, 23 Jan 2014 20:40:52 +0900	[thread overview]
Message-ID: <20140123114051.GB1076@gmail.com> (raw)


Signed-off-by: Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>

---
 src/conntrack/parse_mnl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/conntrack/parse_mnl.c b/src/conntrack/parse_mnl.c
index 1557ff0..98b680b 100644
--- a/src/conntrack/parse_mnl.c
+++ b/src/conntrack/parse_mnl.c
@@ -968,5 +968,6 @@ int nfct_nlmsg_parse(const struct nlmsghdr *nlh, struct nf_conntrack *ct)
        struct nfgenmsg *nfhdr = mnl_nlmsg_get_payload(nlh);

        return nfct_payload_parse((uint8_t *)nfhdr + sizeof(struct nfgenmsg),
-                                 nlh->nlmsg_len, nfhdr->nfgen_family, ct);
+                                 mnl_nlmsg_get_payload_len(nlh) - sizeof(struct nfgenmsg),
+                                 nfhdr->nfgen_family, ct);
 }
--
1.8.5.2

             reply	other threads:[~2014-01-23 11:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-23 11:40 Ken-ichirou MATSUZAWA [this message]
2014-01-29 19:24 ` [PATCH libnetfilter_conntrack] conntrack: fix parsing payload len Pablo Neira Ayuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140123114051.GB1076@gmail.com \
    --to=chamaken@gmail.com \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).