git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
net
/
ipv4
/
netfilter
/
ipt_ULOG.c
diff --git
a/net/ipv4/netfilter/ipt_ULOG.c
b/net/ipv4/netfilter/ipt_ULOG.c
index
51d16d3
..
6f2cefb
100644
(file)
--- a/
net/ipv4/netfilter/ipt_ULOG.c
+++ b/
net/ipv4/netfilter/ipt_ULOG.c
@@
-1,7
+1,7
@@
/*
* netfilter module for userspace packet logging daemons
*
/*
* netfilter module for userspace packet logging daemons
*
- * (C) 2000-200
2
by Harald Welte <laforge@netfilter.org>
+ * (C) 2000-200
4
by Harald Welte <laforge@netfilter.org>
*
* 2000/09/22 ulog-cprange feature added
* 2001/01/04 in-kernel queue as proposed by Sebastian Zander
*
* 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>
* 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>
*
* (C) 1999-2001 Paul `Rusty' Russell
* (C) 2002-2004 Netfilter Core Team <coreteam@netfilter.org>
@@
-98,7
+100,7
@@
typedef struct {
static ulog_buff_t ulog_buffers[ULOG_MAXNLGROUPS]; /* array of buffers */
static struct sock *nflognl; /* our socket */
static ulog_buff_t ulog_buffers[ULOG_MAXNLGROUPS]; /* array of buffers */
static struct sock *nflognl; /* our socket */
-
DECLARE_LOCK(ulog_lock);
/* spinlock */
+
static DECLARE_LOCK(ulog_lock);
/* spinlock */
/* send one ulog_buff_t to userspace */
static void ulog_send(unsigned int nlgroupnum)
/* send one ulog_buff_t to userspace */
static void ulog_send(unsigned int nlgroupnum)
@@
-138,7
+140,7
@@
static void ulog_timer(unsigned long data)
UNLOCK_BH(&ulog_lock);
}
UNLOCK_BH(&ulog_lock);
}
-struct sk_buff *ulog_alloc_skb(unsigned int size)
+st
atic st
ruct sk_buff *ulog_alloc_skb(unsigned int size)
{
struct sk_buff *skb;
{
struct sk_buff *skb;
@@
-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,
/* NLMSG_PUT contains a hidden goto nlmsg_failure !!! */
nlh = NLMSG_PUT(ub->skb, 0, ub->qlen, ULOG_NL_EVENT,
- size
- sizeof(*nlh)
);
+ size
of(*pm)+copy_len
);
ub->qlen++;
pm = NLMSG_DATA(nlh);
ub->qlen++;
pm = NLMSG_DATA(nlh);