[PATCH libnetfilter_conntrack] conntrack: fix parsing payload len

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

 



Signed-off-by: Ken-ichirou MATSUZAWA <chamas@xxxxxxxxxxxxx>

---
 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
--
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