diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2010-03-22 23:09:14 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-03-25 11:03:06 -0400 |
commit | 5d877d876cfb96c0c3254184171b4767501f4f95 (patch) | |
tree | 6d57a3b4fbda96e442e47ce83cdaf5d14c767dbd /net/decnet | |
parent | b2e0b385d77069031edb957839aaaa8441b47287 (diff) |
netfilter: decnet: use NFPROTO values for NF_HOOK invocation
The semantic patch used was:
// <smpl>
@@
@@
NF_HOOK(
-PF_DECnet,
+NFPROTO_DECNET,
...)
// </smpl>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/decnet')
-rw-r--r-- | net/decnet/dn_neigh.c | 9 | ||||
-rw-r--r-- | net/decnet/dn_nsp_in.c | 3 | ||||
-rw-r--r-- | net/decnet/dn_route.c | 28 |
3 files changed, 28 insertions, 12 deletions
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c index 794b5bf95af1..76622c0442be 100644 --- a/net/decnet/dn_neigh.c +++ b/net/decnet/dn_neigh.c | |||
@@ -265,7 +265,8 @@ static int dn_long_output(struct sk_buff *skb) | |||
265 | 265 | ||
266 | skb_reset_network_header(skb); | 266 | skb_reset_network_header(skb); |
267 | 267 | ||
268 | return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); | 268 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL, |
269 | neigh->dev, dn_neigh_output_packet); | ||
269 | } | 270 | } |
270 | 271 | ||
271 | static int dn_short_output(struct sk_buff *skb) | 272 | static int dn_short_output(struct sk_buff *skb) |
@@ -304,7 +305,8 @@ static int dn_short_output(struct sk_buff *skb) | |||
304 | 305 | ||
305 | skb_reset_network_header(skb); | 306 | skb_reset_network_header(skb); |
306 | 307 | ||
307 | return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); | 308 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL, |
309 | neigh->dev, dn_neigh_output_packet); | ||
308 | } | 310 | } |
309 | 311 | ||
310 | /* | 312 | /* |
@@ -346,7 +348,8 @@ static int dn_phase3_output(struct sk_buff *skb) | |||
346 | 348 | ||
347 | skb_reset_network_header(skb); | 349 | skb_reset_network_header(skb); |
348 | 350 | ||
349 | return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet); | 351 | return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL, |
352 | neigh->dev, dn_neigh_output_packet); | ||
350 | } | 353 | } |
351 | 354 | ||
352 | /* | 355 | /* |
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c index 932408dca86d..65531ad96e70 100644 --- a/net/decnet/dn_nsp_in.c +++ b/net/decnet/dn_nsp_in.c | |||
@@ -809,7 +809,8 @@ free_out: | |||
809 | 809 | ||
810 | int dn_nsp_rx(struct sk_buff *skb) | 810 | int dn_nsp_rx(struct sk_buff *skb) |
811 | { | 811 | { |
812 | return NF_HOOK(PF_DECnet, NF_DN_LOCAL_IN, skb, skb->dev, NULL, dn_nsp_rx_packet); | 812 | return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_IN, skb, skb->dev, NULL, |
813 | dn_nsp_rx_packet); | ||
813 | } | 814 | } |
814 | 815 | ||
815 | /* | 816 | /* |
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c index a7bf03ca0a36..86eca5f7f678 100644 --- a/net/decnet/dn_route.c +++ b/net/decnet/dn_route.c | |||
@@ -517,7 +517,8 @@ static int dn_route_rx_long(struct sk_buff *skb) | |||
517 | ptr++; | 517 | ptr++; |
518 | cb->hops = *ptr++; /* Visit Count */ | 518 | cb->hops = *ptr++; /* Visit Count */ |
519 | 519 | ||
520 | return NF_HOOK(PF_DECnet, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, dn_route_rx_packet); | 520 | return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, |
521 | dn_route_rx_packet); | ||
521 | 522 | ||
522 | drop_it: | 523 | drop_it: |
523 | kfree_skb(skb); | 524 | kfree_skb(skb); |
@@ -543,7 +544,8 @@ static int dn_route_rx_short(struct sk_buff *skb) | |||
543 | ptr += 2; | 544 | ptr += 2; |
544 | cb->hops = *ptr & 0x3f; | 545 | cb->hops = *ptr & 0x3f; |
545 | 546 | ||
546 | return NF_HOOK(PF_DECnet, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, dn_route_rx_packet); | 547 | return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, |
548 | dn_route_rx_packet); | ||
547 | 549 | ||
548 | drop_it: | 550 | drop_it: |
549 | kfree_skb(skb); | 551 | kfree_skb(skb); |
@@ -645,16 +647,24 @@ int dn_route_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type | |||
645 | 647 | ||
646 | switch(flags & DN_RT_CNTL_MSK) { | 648 | switch(flags & DN_RT_CNTL_MSK) { |
647 | case DN_RT_PKT_HELO: | 649 | case DN_RT_PKT_HELO: |
648 | return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_route_ptp_hello); | 650 | return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO, |
651 | skb, skb->dev, NULL, | ||
652 | dn_route_ptp_hello); | ||
649 | 653 | ||
650 | case DN_RT_PKT_L1RT: | 654 | case DN_RT_PKT_L1RT: |
651 | case DN_RT_PKT_L2RT: | 655 | case DN_RT_PKT_L2RT: |
652 | return NF_HOOK(PF_DECnet, NF_DN_ROUTE, skb, skb->dev, NULL, dn_route_discard); | 656 | return NF_HOOK(NFPROTO_DECNET, NF_DN_ROUTE, |
657 | skb, skb->dev, NULL, | ||
658 | dn_route_discard); | ||
653 | case DN_RT_PKT_ERTH: | 659 | case DN_RT_PKT_ERTH: |
654 | return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_neigh_router_hello); | 660 | return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO, |
661 | skb, skb->dev, NULL, | ||
662 | dn_neigh_router_hello); | ||
655 | 663 | ||
656 | case DN_RT_PKT_EEDH: | 664 | case DN_RT_PKT_EEDH: |
657 | return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_neigh_endnode_hello); | 665 | return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO, |
666 | skb, skb->dev, NULL, | ||
667 | dn_neigh_endnode_hello); | ||
658 | } | 668 | } |
659 | } else { | 669 | } else { |
660 | if (dn->parms.state != DN_DEV_S_RU) | 670 | if (dn->parms.state != DN_DEV_S_RU) |
@@ -703,7 +713,8 @@ static int dn_output(struct sk_buff *skb) | |||
703 | cb->rt_flags |= DN_RT_F_IE; | 713 | cb->rt_flags |= DN_RT_F_IE; |
704 | cb->hops = 0; | 714 | cb->hops = 0; |
705 | 715 | ||
706 | return NF_HOOK(PF_DECnet, NF_DN_LOCAL_OUT, skb, NULL, dev, neigh->output); | 716 | return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_OUT, skb, NULL, dev, |
717 | neigh->output); | ||
707 | 718 | ||
708 | error: | 719 | error: |
709 | if (net_ratelimit()) | 720 | if (net_ratelimit()) |
@@ -752,7 +763,8 @@ static int dn_forward(struct sk_buff *skb) | |||
752 | if (rt->rt_flags & RTCF_DOREDIRECT) | 763 | if (rt->rt_flags & RTCF_DOREDIRECT) |
753 | cb->rt_flags |= DN_RT_F_IE; | 764 | cb->rt_flags |= DN_RT_F_IE; |
754 | 765 | ||
755 | return NF_HOOK(PF_DECnet, NF_DN_FORWARD, skb, dev, skb->dev, neigh->output); | 766 | return NF_HOOK(NFPROTO_DECNET, NF_DN_FORWARD, skb, dev, skb->dev, |
767 | neigh->output); | ||
756 | 768 | ||
757 | drop: | 769 | drop: |
758 | kfree_skb(skb); | 770 | kfree_skb(skb); |