aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2010-03-22 23:07:21 -0400
committerJan Engelhardt <jengelh@medozas.de>2010-03-25 11:00:29 -0400
commit713aefa3fb3929ce36305d4d1b7b4059d87ed115 (patch)
treed73b898fa5920b434bffd60dce669c48758a2b5d /net/bridge
parent5dc7a6d5749d3ddbf9fbea9512cb45762428512c (diff)
netfilter: bridge: use NFPROTO values for NF_HOOK invocation
The first argument to NF_HOOK* is an nfproto since quite some time. Commit v2.6.27-2457-gfdc9314 was the first to practically start using the new names. Do that now for the remaining NF_HOOK calls. The semantic patch used was: // <smpl> @@ @@ (NF_HOOK |NF_HOOK_THRESH )( -PF_BRIDGE, +NFPROTO_BRIDGE, ...) @@ @@ NF_HOOK( -PF_INET6, +NFPROTO_IPV6, ...) @@ @@ NF_HOOK( -PF_INET, +NFPROTO_IPV4, ...) // </smpl> Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_forward.c10
-rw-r--r--net/bridge/br_input.c6
-rw-r--r--net/bridge/br_multicast.c2
-rw-r--r--net/bridge/br_netfilter.c15
-rw-r--r--net/bridge/br_stp_bpdu.c2
5 files changed, 18 insertions, 17 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index 8dbec83e50ca..7ab52d07b477 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -58,7 +58,7 @@ int br_dev_queue_push_xmit(struct sk_buff *skb)
58 58
59int br_forward_finish(struct sk_buff *skb) 59int br_forward_finish(struct sk_buff *skb)
60{ 60{
61 return NF_HOOK(PF_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev, 61 return NF_HOOK(NFPROTO_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev,
62 br_dev_queue_push_xmit); 62 br_dev_queue_push_xmit);
63 63
64} 64}
@@ -66,8 +66,8 @@ int br_forward_finish(struct sk_buff *skb)
66static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb) 66static void __br_deliver(const struct net_bridge_port *to, struct sk_buff *skb)
67{ 67{
68 skb->dev = to->dev; 68 skb->dev = to->dev;
69 NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, 69 NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
70 br_forward_finish); 70 br_forward_finish);
71} 71}
72 72
73static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb) 73static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
@@ -83,8 +83,8 @@ static void __br_forward(const struct net_bridge_port *to, struct sk_buff *skb)
83 skb->dev = to->dev; 83 skb->dev = to->dev;
84 skb_forward_csum(skb); 84 skb_forward_csum(skb);
85 85
86 NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev, 86 NF_HOOK(NFPROTO_BRIDGE, NF_BR_FORWARD, skb, indev, skb->dev,
87 br_forward_finish); 87 br_forward_finish);
88} 88}
89 89
90/* called with rcu_read_lock */ 90/* called with rcu_read_lock */
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index 333dfb7c5886..c9018fc72d24 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -32,7 +32,7 @@ static int br_pass_frame_up(struct sk_buff *skb)
32 indev = skb->dev; 32 indev = skb->dev;
33 skb->dev = brdev; 33 skb->dev = brdev;
34 34
35 return NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, indev, NULL, 35 return NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN, skb, indev, NULL,
36 netif_receive_skb); 36 netif_receive_skb);
37} 37}
38 38
@@ -155,7 +155,7 @@ struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb)
155 if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0) 155 if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0)
156 goto forward; 156 goto forward;
157 157
158 if (NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev, 158 if (NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_IN, skb, skb->dev,
159 NULL, br_handle_local_finish)) 159 NULL, br_handle_local_finish))
160 return NULL; /* frame consumed by filter */ 160 return NULL; /* frame consumed by filter */
161 else 161 else
@@ -176,7 +176,7 @@ forward:
176 if (!compare_ether_addr(p->br->dev->dev_addr, dest)) 176 if (!compare_ether_addr(p->br->dev->dev_addr, dest))
177 skb->pkt_type = PACKET_HOST; 177 skb->pkt_type = PACKET_HOST;
178 178
179 NF_HOOK(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, 179 NF_HOOK(NFPROTO_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL,
180 br_handle_frame_finish); 180 br_handle_frame_finish);
181 break; 181 break;
182 default: 182 default:
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 6980625537ca..ed19b0a730ab 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -608,7 +608,7 @@ static void br_multicast_send_query(struct net_bridge *br,
608 if (port) { 608 if (port) {
609 __skb_push(skb, sizeof(struct ethhdr)); 609 __skb_push(skb, sizeof(struct ethhdr));
610 skb->dev = port->dev; 610 skb->dev = port->dev;
611 NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, 611 NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
612 dev_queue_xmit); 612 dev_queue_xmit);
613 } else 613 } else
614 netif_rx(skb); 614 netif_rx(skb);
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 268e2e725888..bc6b57248494 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -246,7 +246,7 @@ static int br_nf_pre_routing_finish_ipv6(struct sk_buff *skb)
246 246
247 skb->dev = nf_bridge->physindev; 247 skb->dev = nf_bridge->physindev;
248 nf_bridge_push_encap_header(skb); 248 nf_bridge_push_encap_header(skb);
249 NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, 249 NF_HOOK_THRESH(NFPROTO_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL,
250 br_handle_frame_finish, 1); 250 br_handle_frame_finish, 1);
251 251
252 return 0; 252 return 0;
@@ -396,7 +396,8 @@ bridged_dnat:
396 nf_bridge->mask |= BRNF_BRIDGED_DNAT; 396 nf_bridge->mask |= BRNF_BRIDGED_DNAT;
397 skb->dev = nf_bridge->physindev; 397 skb->dev = nf_bridge->physindev;
398 nf_bridge_push_encap_header(skb); 398 nf_bridge_push_encap_header(skb);
399 NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, 399 NF_HOOK_THRESH(NFPROTO_BRIDGE,
400 NF_BR_PRE_ROUTING,
400 skb, skb->dev, NULL, 401 skb, skb->dev, NULL,
401 br_nf_pre_routing_finish_bridge, 402 br_nf_pre_routing_finish_bridge,
402 1); 403 1);
@@ -417,7 +418,7 @@ bridged_dnat:
417 418
418 skb->dev = nf_bridge->physindev; 419 skb->dev = nf_bridge->physindev;
419 nf_bridge_push_encap_header(skb); 420 nf_bridge_push_encap_header(skb);
420 NF_HOOK_THRESH(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL, 421 NF_HOOK_THRESH(NFPROTO_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL,
421 br_handle_frame_finish, 1); 422 br_handle_frame_finish, 1);
422 423
423 return 0; 424 return 0;
@@ -534,7 +535,7 @@ static unsigned int br_nf_pre_routing_ipv6(unsigned int hook,
534 if (!setup_pre_routing(skb)) 535 if (!setup_pre_routing(skb))
535 return NF_DROP; 536 return NF_DROP;
536 537
537 NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, 538 NF_HOOK(NFPROTO_IPV6, NF_INET_PRE_ROUTING, skb, skb->dev, NULL,
538 br_nf_pre_routing_finish_ipv6); 539 br_nf_pre_routing_finish_ipv6);
539 540
540 return NF_STOLEN; 541 return NF_STOLEN;
@@ -607,7 +608,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb,
607 return NF_DROP; 608 return NF_DROP;
608 store_orig_dstaddr(skb); 609 store_orig_dstaddr(skb);
609 610
610 NF_HOOK(PF_INET, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, 611 NF_HOOK(NFPROTO_IPV4, NF_INET_PRE_ROUTING, skb, skb->dev, NULL,
611 br_nf_pre_routing_finish); 612 br_nf_pre_routing_finish);
612 613
613 return NF_STOLEN; 614 return NF_STOLEN;
@@ -655,7 +656,7 @@ static int br_nf_forward_finish(struct sk_buff *skb)
655 in = *((struct net_device **)(skb->cb)); 656 in = *((struct net_device **)(skb->cb));
656 } 657 }
657 nf_bridge_push_encap_header(skb); 658 nf_bridge_push_encap_header(skb);
658 NF_HOOK_THRESH(PF_BRIDGE, NF_BR_FORWARD, skb, in, 659 NF_HOOK_THRESH(NFPROTO_BRIDGE, NF_BR_FORWARD, skb, in,
659 skb->dev, br_forward_finish, 1); 660 skb->dev, br_forward_finish, 1);
660 return 0; 661 return 0;
661} 662}
@@ -786,7 +787,7 @@ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff *skb,
786 } 787 }
787 nf_bridge_push_encap_header(skb); 788 nf_bridge_push_encap_header(skb);
788 789
789 NF_HOOK(PF_BRIDGE, NF_BR_FORWARD, skb, realindev, skb->dev, 790 NF_HOOK(NFPROTO_BRIDGE, NF_BR_FORWARD, skb, realindev, skb->dev,
790 br_forward_finish); 791 br_forward_finish);
791 return NF_STOLEN; 792 return NF_STOLEN;
792} 793}
diff --git a/net/bridge/br_stp_bpdu.c b/net/bridge/br_stp_bpdu.c
index 81ae40b3f655..11b0157f69c3 100644
--- a/net/bridge/br_stp_bpdu.c
+++ b/net/bridge/br_stp_bpdu.c
@@ -49,7 +49,7 @@ static void br_send_bpdu(struct net_bridge_port *p,
49 49
50 llc_mac_hdr_init(skb, p->dev->dev_addr, p->br->group_addr); 50 llc_mac_hdr_init(skb, p->dev->dev_addr, p->br->group_addr);
51 51
52 NF_HOOK(PF_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev, 52 NF_HOOK(NFPROTO_BRIDGE, NF_BR_LOCAL_OUT, skb, NULL, skb->dev,
53 dev_queue_xmit); 53 dev_queue_xmit);
54} 54}
55 55