diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-03-22 23:07:29 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 11:00:30 -0400 |
commit | 9bbc768aa911a3ef336272eaa6d220abfba8ce50 (patch) | |
tree | 2c2d421e273eb78f3b1d4533b3a8b0654bcd45c0 /net/ipv4/ip_output.c | |
parent | 713aefa3fb3929ce36305d4d1b7b4059d87ed115 (diff) |
netfilter: ipv4: use NFPROTO values for NF_HOOK invocation
The semantic patch that was used:
// <smpl>
@@
@@
(NF_HOOK
|NF_HOOK_COND
|nf_hook
)(
-PF_INET,
+NFPROTO_IPV4,
...)
// </smpl>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 3451799e3dbf..f09135e1e14f 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -95,8 +95,8 @@ int __ip_local_out(struct sk_buff *skb) | |||
95 | 95 | ||
96 | iph->tot_len = htons(skb->len); | 96 | iph->tot_len = htons(skb->len); |
97 | ip_send_check(iph); | 97 | ip_send_check(iph); |
98 | return nf_hook(PF_INET, NF_INET_LOCAL_OUT, skb, NULL, skb_dst(skb)->dev, | 98 | return nf_hook(NFPROTO_IPV4, NF_INET_LOCAL_OUT, skb, NULL, |
99 | dst_output); | 99 | skb_dst(skb)->dev, dst_output); |
100 | } | 100 | } |
101 | 101 | ||
102 | int ip_local_out(struct sk_buff *skb) | 102 | int ip_local_out(struct sk_buff *skb) |
@@ -271,8 +271,8 @@ int ip_mc_output(struct sk_buff *skb) | |||
271 | ) { | 271 | ) { |
272 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); | 272 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); |
273 | if (newskb) | 273 | if (newskb) |
274 | NF_HOOK(PF_INET, NF_INET_POST_ROUTING, newskb, | 274 | NF_HOOK(NFPROTO_IPV4, NF_INET_POST_ROUTING, |
275 | NULL, newskb->dev, | 275 | newskb, NULL, newskb->dev, |
276 | ip_dev_loopback_xmit); | 276 | ip_dev_loopback_xmit); |
277 | } | 277 | } |
278 | 278 | ||
@@ -287,12 +287,12 @@ int ip_mc_output(struct sk_buff *skb) | |||
287 | if (rt->rt_flags&RTCF_BROADCAST) { | 287 | if (rt->rt_flags&RTCF_BROADCAST) { |
288 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); | 288 | struct sk_buff *newskb = skb_clone(skb, GFP_ATOMIC); |
289 | if (newskb) | 289 | if (newskb) |
290 | NF_HOOK(PF_INET, NF_INET_POST_ROUTING, newskb, NULL, | 290 | NF_HOOK(NFPROTO_IPV4, NF_INET_POST_ROUTING, newskb, |
291 | newskb->dev, ip_dev_loopback_xmit); | 291 | NULL, newskb->dev, ip_dev_loopback_xmit); |
292 | } | 292 | } |
293 | 293 | ||
294 | return NF_HOOK_COND(PF_INET, NF_INET_POST_ROUTING, skb, NULL, skb->dev, | 294 | return NF_HOOK_COND(NFPROTO_IPV4, NF_INET_POST_ROUTING, skb, NULL, |
295 | ip_finish_output, | 295 | skb->dev, ip_finish_output, |
296 | !(IPCB(skb)->flags & IPSKB_REROUTED)); | 296 | !(IPCB(skb)->flags & IPSKB_REROUTED)); |
297 | } | 297 | } |
298 | 298 | ||
@@ -305,7 +305,7 @@ int ip_output(struct sk_buff *skb) | |||
305 | skb->dev = dev; | 305 | skb->dev = dev; |
306 | skb->protocol = htons(ETH_P_IP); | 306 | skb->protocol = htons(ETH_P_IP); |
307 | 307 | ||
308 | return NF_HOOK_COND(PF_INET, NF_INET_POST_ROUTING, skb, NULL, dev, | 308 | return NF_HOOK_COND(NFPROTO_IPV4, NF_INET_POST_ROUTING, skb, NULL, dev, |
309 | ip_finish_output, | 309 | ip_finish_output, |
310 | !(IPCB(skb)->flags & IPSKB_REROUTED)); | 310 | !(IPCB(skb)->flags & IPSKB_REROUTED)); |
311 | } | 311 | } |