]> git.baikalelectronics.ru Git - kernel.git/commit
[NETFILTER]: nfnetlink_queue: fix computation of allocated size for netlink skb.
authorEric Leblond <eric@inl.fr>
Mon, 10 Mar 2008 23:41:43 +0000 (16:41 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Mar 2008 23:41:43 +0000 (16:41 -0700)
commitaf33360226077f0be6a0dadff06df569ee685f54
treed1d6e0227240b0600e61d53fe013d1adf8cff20d
parent4bb8acda11002305ffdc2dd3e488bebedbc2cd51
[NETFILTER]: nfnetlink_queue: fix computation of allocated size for netlink skb.

Size of the netlink skb was wrongly computed because the formula was using
NLMSG_ALIGN instead of NLMSG_SPACE. NLMSG_ALIGN does not add the room for
netlink header as NLMSG_SPACE does. This was causing a failure of message
building in some cases.

On my test system, all messages for packets in range [8*k+41, 8*k+48] where k
is an integer were invalid and the corresponding packets were dropped.

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>
net/netfilter/nfnetlink_queue.c