* [PATCH 2.4] NETFILTER: ipt_ULOG fix for last packet delay
@ 2004-08-01 21:27 Harald Welte
2004-08-02 2:40 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Harald Welte @ 2004-08-01 21:27 UTC (permalink / raw)
To: David Miller; +Cc: Netfilter Development Mailinglist
[-- Attachment #1: Type: text/plain, Size: 2452 bytes --]
Hi Dave!
This 2.4-patch was the only bugfix in my recent 2.6.x patch series.
At this point I don't think it's worth to further sync netfilter for
2.4.x and 2.6.x anymore, apart from bufixes, of course.
The ULOG target used to delay the last packet until another one was received.
This patch fixes the issue.
Please apply,
Thanks.
Signed-off-by: Ruby Joker <ruby.joker@op.pl>
Signed-off-by: Harald Welte <laforge@netfilter.org>
--- a/net/ipv4/netfilter/ipt_ULOG.c 2004-05-10 04:32:27.000000000 +0200
+++ b/net/ipv4/netfilter/ipt_ULOG.c 2004-06-18 20:09:03.000000000 +0200
@@ -97,7 +97,6 @@
static ulog_buff_t ulog_buffers[ULOG_MAXNLGROUPS]; /* array of buffers */
static struct sock *nflognl; /* our socket */
-static size_t qlen; /* current length of multipart-nlmsg */
DECLARE_LOCK(ulog_lock); /* spinlock */
/* send one ulog_buff_t to userspace */
@@ -116,7 +115,7 @@
NETLINK_CB(ub->skb).dst_groups = (1 << nlgroupnum);
DEBUGP("ipt_ULOG: throwing %d packets to netlink mask %u\n",
- ub->qlen, nlgroup);
+ ub->qlen, nlgroupnum);
netlink_broadcast(nflognl, ub->skb, 0, (1 << nlgroupnum), GFP_ATOMIC);
ub->qlen = 0;
@@ -126,7 +125,7 @@
}
-/* timer function to flush queue in ULOG_FLUSH_INTERVAL time */
+/* timer function to flush queue in flushtimeout time */
static void ulog_timer(unsigned long data)
{
DEBUGP("ipt_ULOG: timer function called, calling ulog_send\n");
@@ -257,12 +256,6 @@
ub->lastnlh->nlmsg_flags |= NLM_F_MULTI;
}
- /* if threshold is reached, send message to userspace */
- if (qlen >= loginfo->qthreshold) {
- if (loginfo->qthreshold > 1)
- nlh->nlmsg_type = NLMSG_DONE;
- }
-
ub->lastnlh = nlh;
/* if timer isn't already running, start it */
@@ -271,6 +264,13 @@
add_timer(&ub->timer);
}
+ /* if threshold is reached, send message to userspace */
+ if (ub->qlen >= loginfo->qthreshold) {
+ if (loginfo->qthreshold > 1)
+ nlh->nlmsg_type = NLMSG_DONE;
+ ulog_send(groupnum);
+ }
+
UNLOCK_BH(&ulog_lock);
return;
--
- Harald Welte <laforge@netfilter.org> http://www.netfilter.org/
============================================================================
"Fragmentation is like classful addressing -- an interesting early
architectural error that shows how much experimentation was going
on while IP was being designed." -- Paul Vixie
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.4] NETFILTER: ipt_ULOG fix for last packet delay
2004-08-01 21:27 [PATCH 2.4] NETFILTER: ipt_ULOG fix for last packet delay Harald Welte
@ 2004-08-02 2:40 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-08-02 2:40 UTC (permalink / raw)
To: Harald Welte; +Cc: netfilter-devel
On Sun, 1 Aug 2004 23:27:05 +0200
Harald Welte <laforge@netfilter.org> wrote:
> The ULOG target used to delay the last packet until another one was received.
> This patch fixes the issue.
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-02 2:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-01 21:27 [PATCH 2.4] NETFILTER: ipt_ULOG fix for last packet delay Harald Welte
2004-08-02 2:40 ` David S. Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.