[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070212003759.GB8262@rere.qmqm.pl>
Date: Mon, 12 Feb 2007 01:37:59 +0100
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: netfilter-devel@...ts.netfilter.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2.6.20 01/10] nfnetlink_log: don't count max(a,b) twice
We don't need local nlbufsiz (skb size) as nfulnl_alloc_skb() takes
the maximum anyway.
Signed-off-by: Michał Mirosław <mirq-linux@...e.qmqm.pl>
--- linux-2.6.20/net/netfilter/nfnetlink_log.c.orig 2007-02-10 18:25:14.000000000 +0100
+++ linux-2.6.20/net/netfilter/nfnetlink_log.c 2007-02-11 20:20:27.000000000 +0100
@@ -596,7 +596,6 @@ nfulnl_log_packet(unsigned int pf,
struct nfulnl_instance *inst;
const struct nf_loginfo *li;
unsigned int qthreshold;
- unsigned int nlbufsiz;
unsigned int plen;
if (li_user && li_user->type == NF_LOG_TYPE_ULOG)
@@ -672,13 +671,8 @@ nfulnl_log_packet(unsigned int pf,
return;
}
- if (size > inst->nlbufsiz)
- nlbufsiz = size;
- else
- nlbufsiz = inst->nlbufsiz;
-
if (!inst->skb) {
- if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {
+ if (!(inst->skb = nfulnl_alloc_skb(inst->nlbufsiz, size))) {
UDEBUG("error in nfulnl_alloc_skb(%u, %u)\n",
inst->nlbufsiz, size);
goto alloc_failure;
@@ -691,7 +685,7 @@ nfulnl_log_packet(unsigned int pf,
__nfulnl_send(inst);
- if (!(inst->skb = nfulnl_alloc_skb(nlbufsiz, size))) {
+ if (!(inst->skb = nfulnl_alloc_skb(inst->nlbufsiz, size))) {
UDEBUG("error in nfulnl_alloc_skb(%u, %u)\n",
inst->nlbufsiz, size);
goto alloc_failure;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists