aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2006-02-27 16:03:10 -0500
committerDavid S. Miller <davem@davemloft.net>2006-02-27 16:03:10 -0500
commitf92f871989c97a24d284ac60b0f880222ddf87ac (patch)
tree8b9232f0e789dd0769b7025d773e6f2346ff5e95
parente02f7d1603c955126e88cc08149509d00be25cb9 (diff)
[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>
-rw-r--r--net/netfilter/nf_queue.c4
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,
155 if (physoutdev) dev_hold(physoutdev); 155 if (physoutdev) dev_hold(physoutdev);
156 } 156 }
157#endif 157#endif
158 if (queue_rerouter[pf]->save) 158 if (queue_rerouter[pf])
159 queue_rerouter[pf]->save(*skb, info); 159 queue_rerouter[pf]->save(*skb, info);
160 160
161 status = queue_handler[pf]->outfn(*skb, info, queuenum, 161 status = queue_handler[pf]->outfn(*skb, info, queuenum,
162 queue_handler[pf]->data); 162 queue_handler[pf]->data);
163 163
164 if (status >= 0 && queue_rerouter[pf]->reroute) 164 if (status >= 0 && queue_rerouter[pf])
165 status = queue_rerouter[pf]->reroute(skb, info); 165 status = queue_rerouter[pf]->reroute(skb, info);
166 166
167 read_unlock(&queue_handler_lock); 167 read_unlock(&queue_handler_lock);