From: Harald Welte <laforge@netfilter.org>
To: David Miller <davem@redhat.com>
Cc: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: [PATCH 2.4] NETFILTER: ipt_ULOG fix for last packet delay
Date: Sun, 1 Aug 2004 23:27:05 +0200 [thread overview]
Message-ID: <20040801212705.GA18758@sunbeam2> (raw)
[-- 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 --]
next reply other threads:[~2004-08-01 21:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-01 21:27 Harald Welte [this message]
2004-08-02 2:40 ` [PATCH 2.4] NETFILTER: ipt_ULOG fix for last packet delay David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040801212705.GA18758@sunbeam2 \
--to=laforge@netfilter.org \
--cc=davem@redhat.com \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.