summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2008-03-17 15:41:47 +0100
committerChris Wright <chrisw@sous-sol.org>2008-03-24 11:47:54 -0700
commit58392e3a38e2a7a3d4a8e70889be017346c94e90 (patch)
treea48e090962fc92deb7b6d22f94c3ae17b6a7da96
parentc5251ae9027b9d2dcc413335bf834e896f769c30 (diff)
NETFILTER: nfnetlink_log: fix computation of netlink skb size
Upstream commit 7000d38d: This patch is similar to nfnetlink_queue fixes. It fixes the computation of skb size by using NLMSG_SPACE instead of NLMSG_ALIGN. Signed-off-by: Eric Leblond <eric@inl.fr> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--net/netfilter/nfnetlink_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 2c7bd2eb0294..dc43df193e05 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -594,7 +594,7 @@ nfulnl_log_packet(unsigned int pf,
/* FIXME: do we want to make the size calculation conditional based on
* what is actually present? way more branches and checks, but more
* memory efficient... */
- size = NLMSG_ALIGN(sizeof(struct nfgenmsg))
+ size = NLMSG_SPACE(sizeof(struct nfgenmsg))
+ nla_total_size(sizeof(struct nfulnl_msg_packet_hdr))
+ nla_total_size(sizeof(u_int32_t)) /* ifindex */
+ nla_total_size(sizeof(u_int32_t)) /* ifindex */