aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-11-19 21:53:30 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 17:53:55 -0500
commit6e23ae2a48750bda407a4a58f52a4865d7308bf5 (patch)
tree633fd60b2a42bf6fdb86564f0c05a6d52d8dc92b /net/bridge
parent1bf06cd2e338fd6fc29169d30eaf0df982338285 (diff)
[NETFILTER]: Introduce NF_INET_ hook values
The IPv4 and IPv6 hook values are identical, yet some code tries to figure out the "correct" value by looking at the address family. Introduce NF_INET_* values for both IPv4 and IPv6. The old values are kept in a #ifndef __KERNEL__ section for userspace compatibility. Signed-off-by: Patrick McHardy <kaber@trash.net> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_netfilter.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 9f78a69d6b8b..f9ef3e58b4cb 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -511,7 +511,7 @@ static unsigned int br_nf_pre_routing_ipv6(unsigned int hook,
511 if (!setup_pre_routing(skb)) 511 if (!setup_pre_routing(skb))
512 return NF_DROP; 512 return NF_DROP;
513 513
514 NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL, 514 NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, skb->dev, NULL,
515 br_nf_pre_routing_finish_ipv6); 515 br_nf_pre_routing_finish_ipv6);
516 516
517 return NF_STOLEN; 517 return NF_STOLEN;
@@ -584,7 +584,7 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff *skb,
584 return NF_DROP; 584 return NF_DROP;
585 store_orig_dstaddr(skb); 585 store_orig_dstaddr(skb);
586 586
587 NF_HOOK(PF_INET, NF_IP_PRE_ROUTING, skb, skb->dev, NULL, 587 NF_HOOK(PF_INET, NF_INET_PRE_ROUTING, skb, skb->dev, NULL,
588 br_nf_pre_routing_finish); 588 br_nf_pre_routing_finish);
589 589
590 return NF_STOLEN; 590 return NF_STOLEN;
@@ -681,7 +681,7 @@ static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb,
681 nf_bridge->mask |= BRNF_BRIDGED; 681 nf_bridge->mask |= BRNF_BRIDGED;
682 nf_bridge->physoutdev = skb->dev; 682 nf_bridge->physoutdev = skb->dev;
683 683
684 NF_HOOK(pf, NF_IP_FORWARD, skb, bridge_parent(in), parent, 684 NF_HOOK(pf, NF_INET_FORWARD, skb, bridge_parent(in), parent,
685 br_nf_forward_finish); 685 br_nf_forward_finish);
686 686
687 return NF_STOLEN; 687 return NF_STOLEN;
@@ -832,7 +832,7 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff *skb,
832 if (nf_bridge->netoutdev) 832 if (nf_bridge->netoutdev)
833 realoutdev = nf_bridge->netoutdev; 833 realoutdev = nf_bridge->netoutdev;
834#endif 834#endif
835 NF_HOOK(pf, NF_IP_POST_ROUTING, skb, NULL, realoutdev, 835 NF_HOOK(pf, NF_INET_POST_ROUTING, skb, NULL, realoutdev,
836 br_nf_dev_queue_xmit); 836 br_nf_dev_queue_xmit);
837 837
838 return NF_STOLEN; 838 return NF_STOLEN;
@@ -905,12 +905,12 @@ static struct nf_hook_ops br_nf_ops[] = {
905 { .hook = ip_sabotage_in, 905 { .hook = ip_sabotage_in,
906 .owner = THIS_MODULE, 906 .owner = THIS_MODULE,
907 .pf = PF_INET, 907 .pf = PF_INET,
908 .hooknum = NF_IP_PRE_ROUTING, 908 .hooknum = NF_INET_PRE_ROUTING,
909 .priority = NF_IP_PRI_FIRST, }, 909 .priority = NF_IP_PRI_FIRST, },
910 { .hook = ip_sabotage_in, 910 { .hook = ip_sabotage_in,
911 .owner = THIS_MODULE, 911 .owner = THIS_MODULE,
912 .pf = PF_INET6, 912 .pf = PF_INET6,
913 .hooknum = NF_IP6_PRE_ROUTING, 913 .hooknum = NF_INET_PRE_ROUTING,
914 .priority = NF_IP6_PRI_FIRST, }, 914 .priority = NF_IP6_PRI_FIRST, },
915}; 915};
916 916