Commit 3feaf8a0 authored by Harald Welte's avatar Harald Welte Committed by David S. Miller

[NETFILTER]: fix ipt_ULOG bogus error messages

Please apply the fix below, it addresses some bogus error messages
('error during NLMSG_PUT') that were printed because of a wrong
calculation of the 'len' parameter to NLMSG_PUT().
Signed-off-by: default avatarHarald Welte <laforge@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b4e500f1
/*
* netfilter module for userspace packet logging daemons
*
* (C) 2000-2002 by Harald Welte <laforge@netfilter.org>
* (C) 2000-2004 by Harald Welte <laforge@netfilter.org>
*
* 2000/09/22 ulog-cprange feature added
* 2001/01/04 in-kernel queue as proposed by Sebastian Zander
......@@ -13,6 +13,8 @@
* 2002/07/07 remove broken nflog_rcv() function -HW
* 2002/08/29 fix shifted/unshifted nlgroup bug -HW
* 2002/10/30 fix uninitialized mac_len field - <Anders K. Pedersen>
* 2004/10/25 fix erroneous calculation of 'len' parameter to NLMSG_PUT
* resulting in bogus 'error during NLMSG_PUT' messages.
*
* (C) 1999-2001 Paul `Rusty' Russell
* (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
......@@ -212,7 +214,7 @@ static void ipt_ulog_packet(unsigned int hooknum,
/* NLMSG_PUT contains a hidden goto nlmsg_failure !!! */
nlh = NLMSG_PUT(ub->skb, 0, ub->qlen, ULOG_NL_EVENT,
size - sizeof(*nlh));
sizeof(*pm)+copy_len);
ub->qlen++;
pm = NLMSG_DATA(nlh);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment