diff options
author | Eric Leblond <eric@inl.fr> | 2008-03-10 19:42:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-03-10 19:42:04 -0400 |
commit | 7000d38d6126d6ef928605bdacebc9f12279c5aa (patch) | |
tree | 426fc2ff9a0dd6e0e786ecda54969e8ced1c8c5b /net | |
parent | cabaa9bfb01eb4cee97ffb8a18405f4c5175d3d9 (diff) |
[NETFILTER]: nfnetlink_log: fix computation of netlink skb size
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: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nfnetlink_log.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 7efa40d47393..c6802c0d6ed8 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -556,7 +556,7 @@ nfulnl_log_packet(unsigned int pf, | |||
556 | /* FIXME: do we want to make the size calculation conditional based on | 556 | /* FIXME: do we want to make the size calculation conditional based on |
557 | * what is actually present? way more branches and checks, but more | 557 | * what is actually present? way more branches and checks, but more |
558 | * memory efficient... */ | 558 | * memory efficient... */ |
559 | size = NLMSG_ALIGN(sizeof(struct nfgenmsg)) | 559 | size = NLMSG_SPACE(sizeof(struct nfgenmsg)) |
560 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hdr)) | 560 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hdr)) |
561 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ | 561 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ |
562 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ | 562 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ |