diff options
author | Patrick McHardy <kaber@trash.net> | 2007-11-19 21:53:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:53:55 -0500 |
commit | 6e23ae2a48750bda407a4a58f52a4865d7308bf5 (patch) | |
tree | 633fd60b2a42bf6fdb86564f0c05a6d52d8dc92b /net/ipv4/ip_output.c | |
parent | 1bf06cd2e338fd6fc29169d30eaf0df982338285 (diff) |
[NETFILTER]: Introduce NF_INET_ hook values
The IPv4 and IPv6 hook values are identical, yet some code tries to figure
out the "correct" value by looking at the address family. Introduce NF_INET_*
values for both IPv4 and IPv6. The old values are kept in a #ifndef __KERNEL__
section for userspace compatibility.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 03b9b0600276..6dd1d9c5d52e 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -97,7 +97,7 @@ int __ip_local_out(struct sk_buff *skb) | |||
97 | 97 | ||
98 | iph->tot_len = htons(skb->len); | 98 | iph->tot_len = htons(skb->len); |
99 | ip_send_check(iph); | 99 | ip_send_check(iph); |
100 | return nf_hook(PF_INET, NF_IP_LOCAL_OUT, skb, NULL, skb->dst->dev, | 100 | return nf_hook(PF_INET, NF_INET_LOCAL_OUT, skb, NULL, skb->dst->dev, |
101 | dst_output); | 101 | dst_output); |
102 | } | 102 | } |
103 | 103 | ||
@@ -270,8 +270,8 @@ int ip_mc_output(struct sk_buff *skb) | |||
270 | ) { | 270 | ) { |
271 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); | 271 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); |
272 | if (newskb) | 272 | if (newskb) |
273 | NF_HOOK(PF_INET, NF_IP_POST_ROUTING, newskb, NULL, | 273 | NF_HOOK(PF_INET, NF_INET_POST_ROUTING, newskb, |
274 | newskb->dev, | 274 | NULL, newskb->dev, |
275 | ip_dev_loopback_xmit); | 275 | ip_dev_loopback_xmit); |
276 | } | 276 | } |
277 | 277 | ||
@@ -286,11 +286,11 @@ int ip_mc_output(struct sk_buff *skb) | |||
286 | if (rt->rt_flags&RTCF_BROADCAST) { | 286 | if (rt->rt_flags&RTCF_BROADCAST) { |
287 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); | 287 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); |
288 | if (newskb) | 288 | if (newskb) |
289 | NF_HOOK(PF_INET, NF_IP_POST_ROUTING, newskb, NULL, | 289 | NF_HOOK(PF_INET, NF_INET_POST_ROUTING, newskb, NULL, |
290 | newskb->dev, ip_dev_loopback_xmit); | 290 | newskb->dev, ip_dev_loopback_xmit); |
291 | } | 291 | } |
292 | 292 | ||
293 | return NF_HOOK_COND(PF_INET, NF_IP_POST_ROUTING, skb, NULL, skb->dev, | 293 | return NF_HOOK_COND(PF_INET, NF_INET_POST_ROUTING, skb, NULL, skb->dev, |
294 | ip_finish_output, | 294 | ip_finish_output, |
295 | !(IPCB(skb)->flags & IPSKB_REROUTED)); | 295 | !(IPCB(skb)->flags & IPSKB_REROUTED)); |
296 | } | 296 | } |
@@ -304,7 +304,7 @@ int ip_output(struct sk_buff *skb) | |||
304 | skb->dev = dev; | 304 | skb->dev = dev; |
305 | skb->protocol = htons(ETH_P_IP); | 305 | skb->protocol = htons(ETH_P_IP); |
306 | 306 | ||
307 | return NF_HOOK_COND(PF_INET, NF_IP_POST_ROUTING, skb, NULL, dev, | 307 | return NF_HOOK_COND(PF_INET, NF_INET_POST_ROUTING, skb, NULL, dev, |
308 | ip_finish_output, | 308 | ip_finish_output, |
309 | !(IPCB(skb)->flags & IPSKB_REROUTED)); | 309 | !(IPCB(skb)->flags & IPSKB_REROUTED)); |
310 | } | 310 | } |