diff options
author | Patrick McHardy <kaber@trash.net> | 2006-02-27 22:03:10 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-02-27 22:03:10 +0100 |
commit | f92f871989c97a24d284ac60b0f880222ddf87ac (patch) | |
tree | 8b9232f0e789dd0769b7025d773e6f2346ff5e95 /net | |
parent | [NETFILTER]: nf_queue: don't copy registered rerouter data (diff) | |
download | linux-f92f871989c97a24d284ac60b0f880222ddf87ac.tar.xz linux-f92f871989c97a24d284ac60b0f880222ddf87ac.zip |
[NETFILTER]: nf_queue: check if rerouter is present before using it
Every rerouter needs to provide a save and a reroute function, we don't
need to check for them. But we do need to check if a rerouter is registered
at all for the current family, with bridging for example packets of
unregistered families can hit nf_queue.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nf_queue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index 24ad41e6601b..1fc7152fba8f 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c @@ -155,13 +155,13 @@ int nf_queue(struct sk_buff **skb, if (physoutdev) dev_hold(physoutdev); } #endif - if (queue_rerouter[pf]->save) + if (queue_rerouter[pf]) queue_rerouter[pf]->save(*skb, info); status = queue_handler[pf]->outfn(*skb, info, queuenum, queue_handler[pf]->data); - if (status >= 0 && queue_rerouter[pf]->reroute) + if (status >= 0 && queue_rerouter[pf]) status = queue_rerouter[pf]->reroute(skb, info); read_unlock(&queue_handler_lock); |