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/dn_route.c | |
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/dn_route.c')
-rw-r--r-- | net/decnet/dn_route.c | 28 |
1 files changed, 20 insertions, 8 deletions
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); |