netfilter: decnet: use NFPROTO values for NF_HOOK invocation
authorJan Engelhardt <jengelh@medozas.de>
Tue, 23 Mar 2010 03:09:14 +0000 (04:09 +0100)
committerJan Engelhardt <jengelh@medozas.de>
Thu, 25 Mar 2010 15:03:06 +0000 (16:03 +0100)
The semantic patch used was:
// <smpl>
@@
@@
 NF_HOOK(
-PF_DECnet,
+NFPROTO_DECNET,
 ...)
// </smpl>

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
net/decnet/dn_neigh.c
net/decnet/dn_nsp_in.c
net/decnet/dn_route.c

index 794b5bf95af1af0512ee10f2b4884a056ddae9ab..76622c0442be261550fb92dfab335241974906cc 100644 (file)
@@ -265,7 +265,8 @@ static int dn_long_output(struct sk_buff *skb)
 
        skb_reset_network_header(skb);
 
-       return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL,
+                      neigh->dev, dn_neigh_output_packet);
 }
 
 static int dn_short_output(struct sk_buff *skb)
@@ -304,7 +305,8 @@ static int dn_short_output(struct sk_buff *skb)
 
        skb_reset_network_header(skb);
 
-       return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL,
+                      neigh->dev, dn_neigh_output_packet);
 }
 
 /*
@@ -346,7 +348,8 @@ static int dn_phase3_output(struct sk_buff *skb)
 
        skb_reset_network_header(skb);
 
-       return NF_HOOK(PF_DECnet, NF_DN_POST_ROUTING, skb, NULL, neigh->dev, dn_neigh_output_packet);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_POST_ROUTING, skb, NULL,
+                      neigh->dev, dn_neigh_output_packet);
 }
 
 /*
index 932408dca86da3de19a371469f1ea4d54dac1403..65531ad96e7048ed0911d1b6bcb3629f5339bc26 100644 (file)
@@ -809,7 +809,8 @@ free_out:
 
 int dn_nsp_rx(struct sk_buff *skb)
 {
-       return NF_HOOK(PF_DECnet, NF_DN_LOCAL_IN, skb, skb->dev, NULL, dn_nsp_rx_packet);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_IN, skb, skb->dev, NULL,
+                      dn_nsp_rx_packet);
 }
 
 /*
index a7bf03ca0a36a7566c3e3c8c934f819131b34ea0..86eca5f7f678f08f9fe00b383c9fbdd6b59cc70d 100644 (file)
@@ -517,7 +517,8 @@ static int dn_route_rx_long(struct sk_buff *skb)
        ptr++;
        cb->hops = *ptr++; /* Visit Count */
 
-       return NF_HOOK(PF_DECnet, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, dn_route_rx_packet);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING, skb, skb->dev, NULL,
+                      dn_route_rx_packet);
 
 drop_it:
        kfree_skb(skb);
@@ -543,7 +544,8 @@ static int dn_route_rx_short(struct sk_buff *skb)
        ptr += 2;
        cb->hops = *ptr & 0x3f;
 
-       return NF_HOOK(PF_DECnet, NF_DN_PRE_ROUTING, skb, skb->dev, NULL, dn_route_rx_packet);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_PRE_ROUTING, skb, skb->dev, NULL,
+                      dn_route_rx_packet);
 
 drop_it:
        kfree_skb(skb);
@@ -645,16 +647,24 @@ int dn_route_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type
 
                switch(flags & DN_RT_CNTL_MSK) {
                        case DN_RT_PKT_HELO:
-                               return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_route_ptp_hello);
+                               return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO,
+                                              skb, skb->dev, NULL,
+                                              dn_route_ptp_hello);
 
                        case DN_RT_PKT_L1RT:
                        case DN_RT_PKT_L2RT:
-                               return NF_HOOK(PF_DECnet, NF_DN_ROUTE, skb, skb->dev, NULL, dn_route_discard);
+                               return NF_HOOK(NFPROTO_DECNET, NF_DN_ROUTE,
+                                              skb, skb->dev, NULL,
+                                              dn_route_discard);
                        case DN_RT_PKT_ERTH:
-                               return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_neigh_router_hello);
+                               return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO,
+                                              skb, skb->dev, NULL,
+                                              dn_neigh_router_hello);
 
                        case DN_RT_PKT_EEDH:
-                               return NF_HOOK(PF_DECnet, NF_DN_HELLO, skb, skb->dev, NULL, dn_neigh_endnode_hello);
+                               return NF_HOOK(NFPROTO_DECNET, NF_DN_HELLO,
+                                              skb, skb->dev, NULL,
+                                              dn_neigh_endnode_hello);
                }
        } else {
                if (dn->parms.state != DN_DEV_S_RU)
@@ -703,7 +713,8 @@ static int dn_output(struct sk_buff *skb)
        cb->rt_flags |= DN_RT_F_IE;
        cb->hops = 0;
 
-       return NF_HOOK(PF_DECnet, NF_DN_LOCAL_OUT, skb, NULL, dev, neigh->output);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_LOCAL_OUT, skb, NULL, dev,
+                      neigh->output);
 
 error:
        if (net_ratelimit())
@@ -752,7 +763,8 @@ static int dn_forward(struct sk_buff *skb)
        if (rt->rt_flags & RTCF_DOREDIRECT)
                cb->rt_flags |= DN_RT_F_IE;
 
-       return NF_HOOK(PF_DECnet, NF_DN_FORWARD, skb, dev, skb->dev, neigh->output);
+       return NF_HOOK(NFPROTO_DECNET, NF_DN_FORWARD, skb, dev, skb->dev,
+                      neigh->output);
 
 drop:
        kfree_skb(skb);