diff options
author | Patrick McHardy <kaber@trash.net> | 2007-11-19 21:53:30 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 17:53:55 -0500 |
commit | 6e23ae2a48750bda407a4a58f52a4865d7308bf5 (patch) | |
tree | 633fd60b2a42bf6fdb86564f0c05a6d52d8dc92b /net/ipv6 | |
parent | 1bf06cd2e338fd6fc29169d30eaf0df982338285 (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/ipv6')
-rw-r--r-- | net/ipv6/ip6_input.c | 6 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 14 | ||||
-rw-r--r-- | net/ipv6/mcast.c | 6 | ||||
-rw-r--r-- | net/ipv6/ndisc.c | 6 | ||||
-rw-r--r-- | net/ipv6/netfilter.c | 6 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 26 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_REJECT.c | 6 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_eui64.c | 4 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_owner.c | 3 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6table_filter.c | 22 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6table_mangle.c | 40 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6table_raw.c | 14 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 12 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | 2 | ||||
-rw-r--r-- | net/ipv6/raw.c | 2 | ||||
-rw-r--r-- | net/ipv6/xfrm6_input.c | 2 | ||||
-rw-r--r-- | net/ipv6/xfrm6_output.c | 2 | ||||
-rw-r--r-- | net/ipv6/xfrm6_state.c | 2 |
18 files changed, 92 insertions, 83 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index fac6f7f9dd73..79610b4bad3e 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -134,7 +134,8 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
134 | 134 | ||
135 | rcu_read_unlock(); | 135 | rcu_read_unlock(); |
136 | 136 | ||
137 | return NF_HOOK(PF_INET6,NF_IP6_PRE_ROUTING, skb, dev, NULL, ip6_rcv_finish); | 137 | return NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, dev, NULL, |
138 | ip6_rcv_finish); | ||
138 | err: | 139 | err: |
139 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS); | 140 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INHDRERRORS); |
140 | drop: | 141 | drop: |
@@ -229,7 +230,8 @@ discard: | |||
229 | 230 | ||
230 | int ip6_input(struct sk_buff *skb) | 231 | int ip6_input(struct sk_buff *skb) |
231 | { | 232 | { |
232 | return NF_HOOK(PF_INET6,NF_IP6_LOCAL_IN, skb, skb->dev, NULL, ip6_input_finish); | 233 | return NF_HOOK(PF_INET6, NF_INET_LOCAL_IN, skb, skb->dev, NULL, |
234 | ip6_input_finish); | ||
233 | } | 235 | } |
234 | 236 | ||
235 | int ip6_mc_input(struct sk_buff *skb) | 237 | int ip6_mc_input(struct sk_buff *skb) |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index bd121f9ae0a7..d54da616e3af 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -79,7 +79,7 @@ int __ip6_local_out(struct sk_buff *skb) | |||
79 | len = 0; | 79 | len = 0; |
80 | ipv6_hdr(skb)->payload_len = htons(len); | 80 | ipv6_hdr(skb)->payload_len = htons(len); |
81 | 81 | ||
82 | return nf_hook(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dst->dev, | 82 | return nf_hook(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, skb->dst->dev, |
83 | dst_output); | 83 | dst_output); |
84 | } | 84 | } |
85 | 85 | ||
@@ -145,8 +145,8 @@ static int ip6_output2(struct sk_buff *skb) | |||
145 | is not supported in any case. | 145 | is not supported in any case. |
146 | */ | 146 | */ |
147 | if (newskb) | 147 | if (newskb) |
148 | NF_HOOK(PF_INET6, NF_IP6_POST_ROUTING, newskb, NULL, | 148 | NF_HOOK(PF_INET6, NF_INET_POST_ROUTING, newskb, |
149 | newskb->dev, | 149 | NULL, newskb->dev, |
150 | ip6_dev_loopback_xmit); | 150 | ip6_dev_loopback_xmit); |
151 | 151 | ||
152 | if (ipv6_hdr(skb)->hop_limit == 0) { | 152 | if (ipv6_hdr(skb)->hop_limit == 0) { |
@@ -159,7 +159,8 @@ static int ip6_output2(struct sk_buff *skb) | |||
159 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTMCASTPKTS); | 159 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTMCASTPKTS); |
160 | } | 160 | } |
161 | 161 | ||
162 | return NF_HOOK(PF_INET6, NF_IP6_POST_ROUTING, skb,NULL, skb->dev,ip6_output_finish); | 162 | return NF_HOOK(PF_INET6, NF_INET_POST_ROUTING, skb, NULL, skb->dev, |
163 | ip6_output_finish); | ||
163 | } | 164 | } |
164 | 165 | ||
165 | static inline int ip6_skb_dst_mtu(struct sk_buff *skb) | 166 | static inline int ip6_skb_dst_mtu(struct sk_buff *skb) |
@@ -261,7 +262,7 @@ int ip6_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl, | |||
261 | if ((skb->len <= mtu) || ipfragok || skb_is_gso(skb)) { | 262 | if ((skb->len <= mtu) || ipfragok || skb_is_gso(skb)) { |
262 | IP6_INC_STATS(ip6_dst_idev(skb->dst), | 263 | IP6_INC_STATS(ip6_dst_idev(skb->dst), |
263 | IPSTATS_MIB_OUTREQUESTS); | 264 | IPSTATS_MIB_OUTREQUESTS); |
264 | return NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, | 265 | return NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev, |
265 | dst_output); | 266 | dst_output); |
266 | } | 267 | } |
267 | 268 | ||
@@ -525,7 +526,8 @@ int ip6_forward(struct sk_buff *skb) | |||
525 | hdr->hop_limit--; | 526 | hdr->hop_limit--; |
526 | 527 | ||
527 | IP6_INC_STATS_BH(ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS); | 528 | IP6_INC_STATS_BH(ip6_dst_idev(dst), IPSTATS_MIB_OUTFORWDATAGRAMS); |
528 | return NF_HOOK(PF_INET6,NF_IP6_FORWARD, skb, skb->dev, dst->dev, ip6_forward_finish); | 529 | return NF_HOOK(PF_INET6, NF_INET_FORWARD, skb, skb->dev, dst->dev, |
530 | ip6_forward_finish); | ||
529 | 531 | ||
530 | error: | 532 | error: |
531 | IP6_INC_STATS_BH(ip6_dst_idev(dst), IPSTATS_MIB_INADDRERRORS); | 533 | IP6_INC_STATS_BH(ip6_dst_idev(dst), IPSTATS_MIB_INADDRERRORS); |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 17d7318ff7bf..82b12940c2a0 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -1448,7 +1448,7 @@ static inline int mld_dev_queue_xmit2(struct sk_buff *skb) | |||
1448 | 1448 | ||
1449 | static inline int mld_dev_queue_xmit(struct sk_buff *skb) | 1449 | static inline int mld_dev_queue_xmit(struct sk_buff *skb) |
1450 | { | 1450 | { |
1451 | return NF_HOOK(PF_INET6, NF_IP6_POST_ROUTING, skb, NULL, skb->dev, | 1451 | return NF_HOOK(PF_INET6, NF_INET_POST_ROUTING, skb, NULL, skb->dev, |
1452 | mld_dev_queue_xmit2); | 1452 | mld_dev_queue_xmit2); |
1453 | } | 1453 | } |
1454 | 1454 | ||
@@ -1469,7 +1469,7 @@ static void mld_sendpack(struct sk_buff *skb) | |||
1469 | pmr->csum = csum_ipv6_magic(&pip6->saddr, &pip6->daddr, mldlen, | 1469 | pmr->csum = csum_ipv6_magic(&pip6->saddr, &pip6->daddr, mldlen, |
1470 | IPPROTO_ICMPV6, csum_partial(skb_transport_header(skb), | 1470 | IPPROTO_ICMPV6, csum_partial(skb_transport_header(skb), |
1471 | mldlen, 0)); | 1471 | mldlen, 0)); |
1472 | err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev, | 1472 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev, |
1473 | mld_dev_queue_xmit); | 1473 | mld_dev_queue_xmit); |
1474 | if (!err) { | 1474 | if (!err) { |
1475 | ICMP6MSGOUT_INC_STATS_BH(idev, ICMPV6_MLD2_REPORT); | 1475 | ICMP6MSGOUT_INC_STATS_BH(idev, ICMPV6_MLD2_REPORT); |
@@ -1813,7 +1813,7 @@ static void igmp6_send(struct in6_addr *addr, struct net_device *dev, int type) | |||
1813 | 1813 | ||
1814 | idev = in6_dev_get(skb->dev); | 1814 | idev = in6_dev_get(skb->dev); |
1815 | 1815 | ||
1816 | err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, skb->dev, | 1816 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, skb->dev, |
1817 | mld_dev_queue_xmit); | 1817 | mld_dev_queue_xmit); |
1818 | if (!err) { | 1818 | if (!err) { |
1819 | ICMP6MSGOUT_INC_STATS(idev, type); | 1819 | ICMP6MSGOUT_INC_STATS(idev, type); |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 85947eae5bf7..b2531f80317e 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -533,7 +533,8 @@ static void __ndisc_send(struct net_device *dev, | |||
533 | idev = in6_dev_get(dst->dev); | 533 | idev = in6_dev_get(dst->dev); |
534 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); | 534 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); |
535 | 535 | ||
536 | err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output); | 536 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev, |
537 | dst_output); | ||
537 | if (!err) { | 538 | if (!err) { |
538 | ICMP6MSGOUT_INC_STATS(idev, type); | 539 | ICMP6MSGOUT_INC_STATS(idev, type); |
539 | ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); | 540 | ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); |
@@ -1538,7 +1539,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh, | |||
1538 | buff->dst = dst; | 1539 | buff->dst = dst; |
1539 | idev = in6_dev_get(dst->dev); | 1540 | idev = in6_dev_get(dst->dev); |
1540 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); | 1541 | IP6_INC_STATS(idev, IPSTATS_MIB_OUTREQUESTS); |
1541 | err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, buff, NULL, dst->dev, dst_output); | 1542 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, buff, NULL, dst->dev, |
1543 | dst_output); | ||
1542 | if (!err) { | 1544 | if (!err) { |
1543 | ICMP6MSGOUT_INC_STATS(idev, NDISC_REDIRECT); | 1545 | ICMP6MSGOUT_INC_STATS(idev, NDISC_REDIRECT); |
1544 | ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); | 1546 | ICMP6_INC_STATS(idev, ICMP6_MIB_OUTMSGS); |
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c index b1326c2bf8aa..175e19f80253 100644 --- a/net/ipv6/netfilter.c +++ b/net/ipv6/netfilter.c | |||
@@ -60,7 +60,7 @@ static void nf_ip6_saveroute(const struct sk_buff *skb, struct nf_info *info) | |||
60 | { | 60 | { |
61 | struct ip6_rt_info *rt_info = nf_info_reroute(info); | 61 | struct ip6_rt_info *rt_info = nf_info_reroute(info); |
62 | 62 | ||
63 | if (info->hook == NF_IP6_LOCAL_OUT) { | 63 | if (info->hook == NF_INET_LOCAL_OUT) { |
64 | struct ipv6hdr *iph = ipv6_hdr(skb); | 64 | struct ipv6hdr *iph = ipv6_hdr(skb); |
65 | 65 | ||
66 | rt_info->daddr = iph->daddr; | 66 | rt_info->daddr = iph->daddr; |
@@ -72,7 +72,7 @@ static int nf_ip6_reroute(struct sk_buff *skb, const struct nf_info *info) | |||
72 | { | 72 | { |
73 | struct ip6_rt_info *rt_info = nf_info_reroute(info); | 73 | struct ip6_rt_info *rt_info = nf_info_reroute(info); |
74 | 74 | ||
75 | if (info->hook == NF_IP6_LOCAL_OUT) { | 75 | if (info->hook == NF_INET_LOCAL_OUT) { |
76 | struct ipv6hdr *iph = ipv6_hdr(skb); | 76 | struct ipv6hdr *iph = ipv6_hdr(skb); |
77 | if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || | 77 | if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) || |
78 | !ipv6_addr_equal(&iph->saddr, &rt_info->saddr)) | 78 | !ipv6_addr_equal(&iph->saddr, &rt_info->saddr)) |
@@ -89,7 +89,7 @@ __sum16 nf_ip6_checksum(struct sk_buff *skb, unsigned int hook, | |||
89 | 89 | ||
90 | switch (skb->ip_summed) { | 90 | switch (skb->ip_summed) { |
91 | case CHECKSUM_COMPLETE: | 91 | case CHECKSUM_COMPLETE: |
92 | if (hook != NF_IP6_PRE_ROUTING && hook != NF_IP6_LOCAL_IN) | 92 | if (hook != NF_INET_PRE_ROUTING && hook != NF_INET_LOCAL_IN) |
93 | break; | 93 | break; |
94 | if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, | 94 | if (!csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, |
95 | skb->len - dataoff, protocol, | 95 | skb->len - dataoff, protocol, |
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index acaba1537931..e1e87eff4686 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -258,11 +258,11 @@ unconditional(const struct ip6t_ip6 *ipv6) | |||
258 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) | 258 | defined(CONFIG_NETFILTER_XT_TARGET_TRACE_MODULE) |
259 | /* This cries for unification! */ | 259 | /* This cries for unification! */ |
260 | static const char *hooknames[] = { | 260 | static const char *hooknames[] = { |
261 | [NF_IP6_PRE_ROUTING] = "PREROUTING", | 261 | [NF_INET_PRE_ROUTING] = "PREROUTING", |
262 | [NF_IP6_LOCAL_IN] = "INPUT", | 262 | [NF_INET_LOCAL_IN] = "INPUT", |
263 | [NF_IP6_FORWARD] = "FORWARD", | 263 | [NF_INET_FORWARD] = "FORWARD", |
264 | [NF_IP6_LOCAL_OUT] = "OUTPUT", | 264 | [NF_INET_LOCAL_OUT] = "OUTPUT", |
265 | [NF_IP6_POST_ROUTING] = "POSTROUTING", | 265 | [NF_INET_POST_ROUTING] = "POSTROUTING", |
266 | }; | 266 | }; |
267 | 267 | ||
268 | enum nf_ip_trace_comments { | 268 | enum nf_ip_trace_comments { |
@@ -502,7 +502,7 @@ mark_source_chains(struct xt_table_info *newinfo, | |||
502 | 502 | ||
503 | /* No recursion; use packet counter to save back ptrs (reset | 503 | /* No recursion; use packet counter to save back ptrs (reset |
504 | to 0 as we leave), and comefrom to save source hook bitmask */ | 504 | to 0 as we leave), and comefrom to save source hook bitmask */ |
505 | for (hook = 0; hook < NF_IP6_NUMHOOKS; hook++) { | 505 | for (hook = 0; hook < NF_INET_NUMHOOKS; hook++) { |
506 | unsigned int pos = newinfo->hook_entry[hook]; | 506 | unsigned int pos = newinfo->hook_entry[hook]; |
507 | struct ip6t_entry *e | 507 | struct ip6t_entry *e |
508 | = (struct ip6t_entry *)(entry0 + pos); | 508 | = (struct ip6t_entry *)(entry0 + pos); |
@@ -518,13 +518,13 @@ mark_source_chains(struct xt_table_info *newinfo, | |||
518 | struct ip6t_standard_target *t | 518 | struct ip6t_standard_target *t |
519 | = (void *)ip6t_get_target(e); | 519 | = (void *)ip6t_get_target(e); |
520 | 520 | ||
521 | if (e->comefrom & (1 << NF_IP6_NUMHOOKS)) { | 521 | if (e->comefrom & (1 << NF_INET_NUMHOOKS)) { |
522 | printk("iptables: loop hook %u pos %u %08X.\n", | 522 | printk("iptables: loop hook %u pos %u %08X.\n", |
523 | hook, pos, e->comefrom); | 523 | hook, pos, e->comefrom); |
524 | return 0; | 524 | return 0; |
525 | } | 525 | } |
526 | e->comefrom | 526 | e->comefrom |
527 | |= ((1 << hook) | (1 << NF_IP6_NUMHOOKS)); | 527 | |= ((1 << hook) | (1 << NF_INET_NUMHOOKS)); |
528 | 528 | ||
529 | /* Unconditional return/END. */ | 529 | /* Unconditional return/END. */ |
530 | if ((e->target_offset == sizeof(struct ip6t_entry) | 530 | if ((e->target_offset == sizeof(struct ip6t_entry) |
@@ -544,10 +544,10 @@ mark_source_chains(struct xt_table_info *newinfo, | |||
544 | /* Return: backtrack through the last | 544 | /* Return: backtrack through the last |
545 | big jump. */ | 545 | big jump. */ |
546 | do { | 546 | do { |
547 | e->comefrom ^= (1<<NF_IP6_NUMHOOKS); | 547 | e->comefrom ^= (1<<NF_INET_NUMHOOKS); |
548 | #ifdef DEBUG_IP_FIREWALL_USER | 548 | #ifdef DEBUG_IP_FIREWALL_USER |
549 | if (e->comefrom | 549 | if (e->comefrom |
550 | & (1 << NF_IP6_NUMHOOKS)) { | 550 | & (1 << NF_INET_NUMHOOKS)) { |
551 | duprintf("Back unset " | 551 | duprintf("Back unset " |
552 | "on hook %u " | 552 | "on hook %u " |
553 | "rule %u\n", | 553 | "rule %u\n", |
@@ -746,7 +746,7 @@ check_entry_size_and_hooks(struct ip6t_entry *e, | |||
746 | } | 746 | } |
747 | 747 | ||
748 | /* Check hooks & underflows */ | 748 | /* Check hooks & underflows */ |
749 | for (h = 0; h < NF_IP6_NUMHOOKS; h++) { | 749 | for (h = 0; h < NF_INET_NUMHOOKS; h++) { |
750 | if ((unsigned char *)e - base == hook_entries[h]) | 750 | if ((unsigned char *)e - base == hook_entries[h]) |
751 | newinfo->hook_entry[h] = hook_entries[h]; | 751 | newinfo->hook_entry[h] = hook_entries[h]; |
752 | if ((unsigned char *)e - base == underflows[h]) | 752 | if ((unsigned char *)e - base == underflows[h]) |
@@ -800,7 +800,7 @@ translate_table(const char *name, | |||
800 | newinfo->number = number; | 800 | newinfo->number = number; |
801 | 801 | ||
802 | /* Init all hooks to impossible value. */ | 802 | /* Init all hooks to impossible value. */ |
803 | for (i = 0; i < NF_IP6_NUMHOOKS; i++) { | 803 | for (i = 0; i < NF_INET_NUMHOOKS; i++) { |
804 | newinfo->hook_entry[i] = 0xFFFFFFFF; | 804 | newinfo->hook_entry[i] = 0xFFFFFFFF; |
805 | newinfo->underflow[i] = 0xFFFFFFFF; | 805 | newinfo->underflow[i] = 0xFFFFFFFF; |
806 | } | 806 | } |
@@ -824,7 +824,7 @@ translate_table(const char *name, | |||
824 | } | 824 | } |
825 | 825 | ||
826 | /* Check hooks all assigned */ | 826 | /* Check hooks all assigned */ |
827 | for (i = 0; i < NF_IP6_NUMHOOKS; i++) { | 827 | for (i = 0; i < NF_INET_NUMHOOKS; i++) { |
828 | /* Only hooks which are valid */ | 828 | /* Only hooks which are valid */ |
829 | if (!(valid_hooks & (1 << i))) | 829 | if (!(valid_hooks & (1 << i))) |
830 | continue; | 830 | continue; |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index c1c663482837..960ba1780a9c 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
@@ -164,7 +164,7 @@ static void send_reset(struct sk_buff *oldskb) | |||
164 | static inline void | 164 | static inline void |
165 | send_unreach(struct sk_buff *skb_in, unsigned char code, unsigned int hooknum) | 165 | send_unreach(struct sk_buff *skb_in, unsigned char code, unsigned int hooknum) |
166 | { | 166 | { |
167 | if (hooknum == NF_IP6_LOCAL_OUT && skb_in->dev == NULL) | 167 | if (hooknum == NF_INET_LOCAL_OUT && skb_in->dev == NULL) |
168 | skb_in->dev = init_net.loopback_dev; | 168 | skb_in->dev = init_net.loopback_dev; |
169 | 169 | ||
170 | icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0, NULL); | 170 | icmpv6_send(skb_in, ICMPV6_DEST_UNREACH, code, 0, NULL); |
@@ -243,8 +243,8 @@ static struct xt_target ip6t_reject_reg __read_mostly = { | |||
243 | .target = reject6_target, | 243 | .target = reject6_target, |
244 | .targetsize = sizeof(struct ip6t_reject_info), | 244 | .targetsize = sizeof(struct ip6t_reject_info), |
245 | .table = "filter", | 245 | .table = "filter", |
246 | .hooks = (1 << NF_IP6_LOCAL_IN) | (1 << NF_IP6_FORWARD) | | 246 | .hooks = (1 << NF_INET_LOCAL_IN) | (1 << NF_INET_FORWARD) | |
247 | (1 << NF_IP6_LOCAL_OUT), | 247 | (1 << NF_INET_LOCAL_OUT), |
248 | .checkentry = check, | 248 | .checkentry = check, |
249 | .me = THIS_MODULE | 249 | .me = THIS_MODULE |
250 | }; | 250 | }; |
diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c index 41df9a578c7a..ff71269579da 100644 --- a/net/ipv6/netfilter/ip6t_eui64.c +++ b/net/ipv6/netfilter/ip6t_eui64.c | |||
@@ -67,8 +67,8 @@ static struct xt_match eui64_match __read_mostly = { | |||
67 | .family = AF_INET6, | 67 | .family = AF_INET6, |
68 | .match = match, | 68 | .match = match, |
69 | .matchsize = sizeof(int), | 69 | .matchsize = sizeof(int), |
70 | .hooks = (1 << NF_IP6_PRE_ROUTING) | (1 << NF_IP6_LOCAL_IN) | | 70 | .hooks = (1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_IN) | |
71 | (1 << NF_IP6_FORWARD), | 71 | (1 << NF_INET_FORWARD), |
72 | .me = THIS_MODULE, | 72 | .me = THIS_MODULE, |
73 | }; | 73 | }; |
74 | 74 | ||
diff --git a/net/ipv6/netfilter/ip6t_owner.c b/net/ipv6/netfilter/ip6t_owner.c index 6036613aef36..1e0dc4a972cf 100644 --- a/net/ipv6/netfilter/ip6t_owner.c +++ b/net/ipv6/netfilter/ip6t_owner.c | |||
@@ -73,7 +73,8 @@ static struct xt_match owner_match __read_mostly = { | |||
73 | .family = AF_INET6, | 73 | .family = AF_INET6, |
74 | .match = match, | 74 | .match = match, |
75 | .matchsize = sizeof(struct ip6t_owner_info), | 75 | .matchsize = sizeof(struct ip6t_owner_info), |
76 | .hooks = (1 << NF_IP6_LOCAL_OUT) | (1 << NF_IP6_POST_ROUTING), | 76 | .hooks = (1 << NF_INET_LOCAL_OUT) | |
77 | (1 << NF_INET_POST_ROUTING), | ||
77 | .checkentry = checkentry, | 78 | .checkentry = checkentry, |
78 | .me = THIS_MODULE, | 79 | .me = THIS_MODULE, |
79 | }; | 80 | }; |
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c index 1d26b202bf30..0ae072dd6924 100644 --- a/net/ipv6/netfilter/ip6table_filter.c +++ b/net/ipv6/netfilter/ip6table_filter.c | |||
@@ -17,7 +17,9 @@ MODULE_LICENSE("GPL"); | |||
17 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); | 17 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); |
18 | MODULE_DESCRIPTION("ip6tables filter table"); | 18 | MODULE_DESCRIPTION("ip6tables filter table"); |
19 | 19 | ||
20 | #define FILTER_VALID_HOOKS ((1 << NF_IP6_LOCAL_IN) | (1 << NF_IP6_FORWARD) | (1 << NF_IP6_LOCAL_OUT)) | 20 | #define FILTER_VALID_HOOKS ((1 << NF_INET_LOCAL_IN) | \ |
21 | (1 << NF_INET_FORWARD) | \ | ||
22 | (1 << NF_INET_LOCAL_OUT)) | ||
21 | 23 | ||
22 | static struct | 24 | static struct |
23 | { | 25 | { |
@@ -31,14 +33,14 @@ static struct | |||
31 | .num_entries = 4, | 33 | .num_entries = 4, |
32 | .size = sizeof(struct ip6t_standard) * 3 + sizeof(struct ip6t_error), | 34 | .size = sizeof(struct ip6t_standard) * 3 + sizeof(struct ip6t_error), |
33 | .hook_entry = { | 35 | .hook_entry = { |
34 | [NF_IP6_LOCAL_IN] = 0, | 36 | [NF_INET_LOCAL_IN] = 0, |
35 | [NF_IP6_FORWARD] = sizeof(struct ip6t_standard), | 37 | [NF_INET_FORWARD] = sizeof(struct ip6t_standard), |
36 | [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard) * 2 | 38 | [NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) * 2 |
37 | }, | 39 | }, |
38 | .underflow = { | 40 | .underflow = { |
39 | [NF_IP6_LOCAL_IN] = 0, | 41 | [NF_INET_LOCAL_IN] = 0, |
40 | [NF_IP6_FORWARD] = sizeof(struct ip6t_standard), | 42 | [NF_INET_FORWARD] = sizeof(struct ip6t_standard), |
41 | [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard) * 2 | 43 | [NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) * 2 |
42 | }, | 44 | }, |
43 | }, | 45 | }, |
44 | .entries = { | 46 | .entries = { |
@@ -93,21 +95,21 @@ static struct nf_hook_ops ip6t_ops[] = { | |||
93 | .hook = ip6t_hook, | 95 | .hook = ip6t_hook, |
94 | .owner = THIS_MODULE, | 96 | .owner = THIS_MODULE, |
95 | .pf = PF_INET6, | 97 | .pf = PF_INET6, |
96 | .hooknum = NF_IP6_LOCAL_IN, | 98 | .hooknum = NF_INET_LOCAL_IN, |
97 | .priority = NF_IP6_PRI_FILTER, | 99 | .priority = NF_IP6_PRI_FILTER, |
98 | }, | 100 | }, |
99 | { | 101 | { |
100 | .hook = ip6t_hook, | 102 | .hook = ip6t_hook, |
101 | .owner = THIS_MODULE, | 103 | .owner = THIS_MODULE, |
102 | .pf = PF_INET6, | 104 | .pf = PF_INET6, |
103 | .hooknum = NF_IP6_FORWARD, | 105 | .hooknum = NF_INET_FORWARD, |
104 | .priority = NF_IP6_PRI_FILTER, | 106 | .priority = NF_IP6_PRI_FILTER, |
105 | }, | 107 | }, |
106 | { | 108 | { |
107 | .hook = ip6t_local_out_hook, | 109 | .hook = ip6t_local_out_hook, |
108 | .owner = THIS_MODULE, | 110 | .owner = THIS_MODULE, |
109 | .pf = PF_INET6, | 111 | .pf = PF_INET6, |
110 | .hooknum = NF_IP6_LOCAL_OUT, | 112 | .hooknum = NF_INET_LOCAL_OUT, |
111 | .priority = NF_IP6_PRI_FILTER, | 113 | .priority = NF_IP6_PRI_FILTER, |
112 | }, | 114 | }, |
113 | }; | 115 | }; |
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c index a0b6381f1e8c..8e62b2316829 100644 --- a/net/ipv6/netfilter/ip6table_mangle.c +++ b/net/ipv6/netfilter/ip6table_mangle.c | |||
@@ -15,11 +15,11 @@ MODULE_LICENSE("GPL"); | |||
15 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); | 15 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); |
16 | MODULE_DESCRIPTION("ip6tables mangle table"); | 16 | MODULE_DESCRIPTION("ip6tables mangle table"); |
17 | 17 | ||
18 | #define MANGLE_VALID_HOOKS ((1 << NF_IP6_PRE_ROUTING) | \ | 18 | #define MANGLE_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | \ |
19 | (1 << NF_IP6_LOCAL_IN) | \ | 19 | (1 << NF_INET_LOCAL_IN) | \ |
20 | (1 << NF_IP6_FORWARD) | \ | 20 | (1 << NF_INET_FORWARD) | \ |
21 | (1 << NF_IP6_LOCAL_OUT) | \ | 21 | (1 << NF_INET_LOCAL_OUT) | \ |
22 | (1 << NF_IP6_POST_ROUTING)) | 22 | (1 << NF_INET_POST_ROUTING)) |
23 | 23 | ||
24 | static struct | 24 | static struct |
25 | { | 25 | { |
@@ -33,18 +33,18 @@ static struct | |||
33 | .num_entries = 6, | 33 | .num_entries = 6, |
34 | .size = sizeof(struct ip6t_standard) * 5 + sizeof(struct ip6t_error), | 34 | .size = sizeof(struct ip6t_standard) * 5 + sizeof(struct ip6t_error), |
35 | .hook_entry = { | 35 | .hook_entry = { |
36 | [NF_IP6_PRE_ROUTING] = 0, | 36 | [NF_INET_PRE_ROUTING] = 0, |
37 | [NF_IP6_LOCAL_IN] = sizeof(struct ip6t_standard), | 37 | [NF_INET_LOCAL_IN] = sizeof(struct ip6t_standard), |
38 | [NF_IP6_FORWARD] = sizeof(struct ip6t_standard) * 2, | 38 | [NF_INET_FORWARD] = sizeof(struct ip6t_standard) * 2, |
39 | [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard) * 3, | 39 | [NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) * 3, |
40 | [NF_IP6_POST_ROUTING] = sizeof(struct ip6t_standard) * 4, | 40 | [NF_INET_POST_ROUTING] = sizeof(struct ip6t_standard) * 4, |
41 | }, | 41 | }, |
42 | .underflow = { | 42 | .underflow = { |
43 | [NF_IP6_PRE_ROUTING] = 0, | 43 | [NF_INET_PRE_ROUTING] = 0, |
44 | [NF_IP6_LOCAL_IN] = sizeof(struct ip6t_standard), | 44 | [NF_INET_LOCAL_IN] = sizeof(struct ip6t_standard), |
45 | [NF_IP6_FORWARD] = sizeof(struct ip6t_standard) * 2, | 45 | [NF_INET_FORWARD] = sizeof(struct ip6t_standard) * 2, |
46 | [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard) * 3, | 46 | [NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) * 3, |
47 | [NF_IP6_POST_ROUTING] = sizeof(struct ip6t_standard) * 4, | 47 | [NF_INET_POST_ROUTING] = sizeof(struct ip6t_standard) * 4, |
48 | }, | 48 | }, |
49 | }, | 49 | }, |
50 | .entries = { | 50 | .entries = { |
@@ -125,35 +125,35 @@ static struct nf_hook_ops ip6t_ops[] = { | |||
125 | .hook = ip6t_route_hook, | 125 | .hook = ip6t_route_hook, |
126 | .owner = THIS_MODULE, | 126 | .owner = THIS_MODULE, |
127 | .pf = PF_INET6, | 127 | .pf = PF_INET6, |
128 | .hooknum = NF_IP6_PRE_ROUTING, | 128 | .hooknum = NF_INET_PRE_ROUTING, |
129 | .priority = NF_IP6_PRI_MANGLE, | 129 | .priority = NF_IP6_PRI_MANGLE, |
130 | }, | 130 | }, |
131 | { | 131 | { |
132 | .hook = ip6t_local_hook, | 132 | .hook = ip6t_local_hook, |
133 | .owner = THIS_MODULE, | 133 | .owner = THIS_MODULE, |
134 | .pf = PF_INET6, | 134 | .pf = PF_INET6, |
135 | .hooknum = NF_IP6_LOCAL_IN, | 135 | .hooknum = NF_INET_LOCAL_IN, |
136 | .priority = NF_IP6_PRI_MANGLE, | 136 | .priority = NF_IP6_PRI_MANGLE, |
137 | }, | 137 | }, |
138 | { | 138 | { |
139 | .hook = ip6t_route_hook, | 139 | .hook = ip6t_route_hook, |
140 | .owner = THIS_MODULE, | 140 | .owner = THIS_MODULE, |
141 | .pf = PF_INET6, | 141 | .pf = PF_INET6, |
142 | .hooknum = NF_IP6_FORWARD, | 142 | .hooknum = NF_INET_FORWARD, |
143 | .priority = NF_IP6_PRI_MANGLE, | 143 | .priority = NF_IP6_PRI_MANGLE, |
144 | }, | 144 | }, |
145 | { | 145 | { |
146 | .hook = ip6t_local_hook, | 146 | .hook = ip6t_local_hook, |
147 | .owner = THIS_MODULE, | 147 | .owner = THIS_MODULE, |
148 | .pf = PF_INET6, | 148 | .pf = PF_INET6, |
149 | .hooknum = NF_IP6_LOCAL_OUT, | 149 | .hooknum = NF_INET_LOCAL_OUT, |
150 | .priority = NF_IP6_PRI_MANGLE, | 150 | .priority = NF_IP6_PRI_MANGLE, |
151 | }, | 151 | }, |
152 | { | 152 | { |
153 | .hook = ip6t_route_hook, | 153 | .hook = ip6t_route_hook, |
154 | .owner = THIS_MODULE, | 154 | .owner = THIS_MODULE, |
155 | .pf = PF_INET6, | 155 | .pf = PF_INET6, |
156 | .hooknum = NF_IP6_POST_ROUTING, | 156 | .hooknum = NF_INET_POST_ROUTING, |
157 | .priority = NF_IP6_PRI_MANGLE, | 157 | .priority = NF_IP6_PRI_MANGLE, |
158 | }, | 158 | }, |
159 | }; | 159 | }; |
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c index 8f7109f991e6..4fecd8de8cc2 100644 --- a/net/ipv6/netfilter/ip6table_raw.c +++ b/net/ipv6/netfilter/ip6table_raw.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
7 | #include <linux/netfilter_ipv6/ip6_tables.h> | 7 | #include <linux/netfilter_ipv6/ip6_tables.h> |
8 | 8 | ||
9 | #define RAW_VALID_HOOKS ((1 << NF_IP6_PRE_ROUTING) | (1 << NF_IP6_LOCAL_OUT)) | 9 | #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT)) |
10 | 10 | ||
11 | static struct | 11 | static struct |
12 | { | 12 | { |
@@ -20,12 +20,12 @@ static struct | |||
20 | .num_entries = 3, | 20 | .num_entries = 3, |
21 | .size = sizeof(struct ip6t_standard) * 2 + sizeof(struct ip6t_error), | 21 | .size = sizeof(struct ip6t_standard) * 2 + sizeof(struct ip6t_error), |
22 | .hook_entry = { | 22 | .hook_entry = { |
23 | [NF_IP6_PRE_ROUTING] = 0, | 23 | [NF_INET_PRE_ROUTING] = 0, |
24 | [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard) | 24 | [NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) |
25 | }, | 25 | }, |
26 | .underflow = { | 26 | .underflow = { |
27 | [NF_IP6_PRE_ROUTING] = 0, | 27 | [NF_INET_PRE_ROUTING] = 0, |
28 | [NF_IP6_LOCAL_OUT] = sizeof(struct ip6t_standard) | 28 | [NF_INET_LOCAL_OUT] = sizeof(struct ip6t_standard) |
29 | }, | 29 | }, |
30 | }, | 30 | }, |
31 | .entries = { | 31 | .entries = { |
@@ -58,14 +58,14 @@ static struct nf_hook_ops ip6t_ops[] = { | |||
58 | { | 58 | { |
59 | .hook = ip6t_hook, | 59 | .hook = ip6t_hook, |
60 | .pf = PF_INET6, | 60 | .pf = PF_INET6, |
61 | .hooknum = NF_IP6_PRE_ROUTING, | 61 | .hooknum = NF_INET_PRE_ROUTING, |
62 | .priority = NF_IP6_PRI_FIRST, | 62 | .priority = NF_IP6_PRI_FIRST, |
63 | .owner = THIS_MODULE, | 63 | .owner = THIS_MODULE, |
64 | }, | 64 | }, |
65 | { | 65 | { |
66 | .hook = ip6t_hook, | 66 | .hook = ip6t_hook, |
67 | .pf = PF_INET6, | 67 | .pf = PF_INET6, |
68 | .hooknum = NF_IP6_LOCAL_OUT, | 68 | .hooknum = NF_INET_LOCAL_OUT, |
69 | .priority = NF_IP6_PRI_FIRST, | 69 | .priority = NF_IP6_PRI_FIRST, |
70 | .owner = THIS_MODULE, | 70 | .owner = THIS_MODULE, |
71 | }, | 71 | }, |
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index ad74bab05047..50f46787fda4 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
@@ -263,42 +263,42 @@ static struct nf_hook_ops ipv6_conntrack_ops[] = { | |||
263 | .hook = ipv6_defrag, | 263 | .hook = ipv6_defrag, |
264 | .owner = THIS_MODULE, | 264 | .owner = THIS_MODULE, |
265 | .pf = PF_INET6, | 265 | .pf = PF_INET6, |
266 | .hooknum = NF_IP6_PRE_ROUTING, | 266 | .hooknum = NF_INET_PRE_ROUTING, |
267 | .priority = NF_IP6_PRI_CONNTRACK_DEFRAG, | 267 | .priority = NF_IP6_PRI_CONNTRACK_DEFRAG, |
268 | }, | 268 | }, |
269 | { | 269 | { |
270 | .hook = ipv6_conntrack_in, | 270 | .hook = ipv6_conntrack_in, |
271 | .owner = THIS_MODULE, | 271 | .owner = THIS_MODULE, |
272 | .pf = PF_INET6, | 272 | .pf = PF_INET6, |
273 | .hooknum = NF_IP6_PRE_ROUTING, | 273 | .hooknum = NF_INET_PRE_ROUTING, |
274 | .priority = NF_IP6_PRI_CONNTRACK, | 274 | .priority = NF_IP6_PRI_CONNTRACK, |
275 | }, | 275 | }, |
276 | { | 276 | { |
277 | .hook = ipv6_conntrack_local, | 277 | .hook = ipv6_conntrack_local, |
278 | .owner = THIS_MODULE, | 278 | .owner = THIS_MODULE, |
279 | .pf = PF_INET6, | 279 | .pf = PF_INET6, |
280 | .hooknum = NF_IP6_LOCAL_OUT, | 280 | .hooknum = NF_INET_LOCAL_OUT, |
281 | .priority = NF_IP6_PRI_CONNTRACK, | 281 | .priority = NF_IP6_PRI_CONNTRACK, |
282 | }, | 282 | }, |
283 | { | 283 | { |
284 | .hook = ipv6_defrag, | 284 | .hook = ipv6_defrag, |
285 | .owner = THIS_MODULE, | 285 | .owner = THIS_MODULE, |
286 | .pf = PF_INET6, | 286 | .pf = PF_INET6, |
287 | .hooknum = NF_IP6_LOCAL_OUT, | 287 | .hooknum = NF_INET_LOCAL_OUT, |
288 | .priority = NF_IP6_PRI_CONNTRACK_DEFRAG, | 288 | .priority = NF_IP6_PRI_CONNTRACK_DEFRAG, |
289 | }, | 289 | }, |
290 | { | 290 | { |
291 | .hook = ipv6_confirm, | 291 | .hook = ipv6_confirm, |
292 | .owner = THIS_MODULE, | 292 | .owner = THIS_MODULE, |
293 | .pf = PF_INET6, | 293 | .pf = PF_INET6, |
294 | .hooknum = NF_IP6_POST_ROUTING, | 294 | .hooknum = NF_INET_POST_ROUTING, |
295 | .priority = NF_IP6_PRI_LAST, | 295 | .priority = NF_IP6_PRI_LAST, |
296 | }, | 296 | }, |
297 | { | 297 | { |
298 | .hook = ipv6_confirm, | 298 | .hook = ipv6_confirm, |
299 | .owner = THIS_MODULE, | 299 | .owner = THIS_MODULE, |
300 | .pf = PF_INET6, | 300 | .pf = PF_INET6, |
301 | .hooknum = NF_IP6_LOCAL_IN, | 301 | .hooknum = NF_INET_LOCAL_IN, |
302 | .priority = NF_IP6_PRI_LAST-1, | 302 | .priority = NF_IP6_PRI_LAST-1, |
303 | }, | 303 | }, |
304 | }; | 304 | }; |
diff --git a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c index fd9123f3dc04..e99384f9764d 100644 --- a/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c +++ b/net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c | |||
@@ -192,7 +192,7 @@ icmpv6_error(struct sk_buff *skb, unsigned int dataoff, | |||
192 | return -NF_ACCEPT; | 192 | return -NF_ACCEPT; |
193 | } | 193 | } |
194 | 194 | ||
195 | if (nf_conntrack_checksum && hooknum == NF_IP6_PRE_ROUTING && | 195 | if (nf_conntrack_checksum && hooknum == NF_INET_PRE_ROUTING && |
196 | nf_ip6_checksum(skb, hooknum, dataoff, IPPROTO_ICMPV6)) { | 196 | nf_ip6_checksum(skb, hooknum, dataoff, IPPROTO_ICMPV6)) { |
197 | nf_log_packet(PF_INET6, 0, skb, NULL, NULL, NULL, | 197 | nf_log_packet(PF_INET6, 0, skb, NULL, NULL, NULL, |
198 | "nf_ct_icmpv6: ICMPv6 checksum failed\n"); | 198 | "nf_ct_icmpv6: ICMPv6 checksum failed\n"); |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ae314f3fea46..ad622cc11bda 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -619,7 +619,7 @@ static int rawv6_send_hdrinc(struct sock *sk, void *from, int length, | |||
619 | goto error_fault; | 619 | goto error_fault; |
620 | 620 | ||
621 | IP6_INC_STATS(rt->rt6i_idev, IPSTATS_MIB_OUTREQUESTS); | 621 | IP6_INC_STATS(rt->rt6i_idev, IPSTATS_MIB_OUTREQUESTS); |
622 | err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, rt->u.dst.dev, | 622 | err = NF_HOOK(PF_INET6, NF_INET_LOCAL_OUT, skb, NULL, rt->u.dst.dev, |
623 | dst_output); | 623 | dst_output); |
624 | if (err > 0) | 624 | if (err > 0) |
625 | err = np->recverr ? net_xmit_errno(err) : 0; | 625 | err = np->recverr ? net_xmit_errno(err) : 0; |
diff --git a/net/ipv6/xfrm6_input.c b/net/ipv6/xfrm6_input.c index e317d0855468..e2c3efd2579d 100644 --- a/net/ipv6/xfrm6_input.c +++ b/net/ipv6/xfrm6_input.c | |||
@@ -37,7 +37,7 @@ int xfrm6_transport_finish(struct sk_buff *skb, int async) | |||
37 | ipv6_hdr(skb)->payload_len = htons(skb->len); | 37 | ipv6_hdr(skb)->payload_len = htons(skb->len); |
38 | __skb_push(skb, skb->data - skb_network_header(skb)); | 38 | __skb_push(skb, skb->data - skb_network_header(skb)); |
39 | 39 | ||
40 | NF_HOOK(PF_INET6, NF_IP6_PRE_ROUTING, skb, skb->dev, NULL, | 40 | NF_HOOK(PF_INET6, NF_INET_PRE_ROUTING, skb, skb->dev, NULL, |
41 | ip6_rcv_finish); | 41 | ip6_rcv_finish); |
42 | return -1; | 42 | return -1; |
43 | #else | 43 | #else |
diff --git a/net/ipv6/xfrm6_output.c b/net/ipv6/xfrm6_output.c index 318669a9cb48..b34c58c65656 100644 --- a/net/ipv6/xfrm6_output.c +++ b/net/ipv6/xfrm6_output.c | |||
@@ -89,6 +89,6 @@ static int xfrm6_output_finish(struct sk_buff *skb) | |||
89 | 89 | ||
90 | int xfrm6_output(struct sk_buff *skb) | 90 | int xfrm6_output(struct sk_buff *skb) |
91 | { | 91 | { |
92 | return NF_HOOK(PF_INET6, NF_IP6_POST_ROUTING, skb, NULL, skb->dst->dev, | 92 | return NF_HOOK(PF_INET6, NF_INET_POST_ROUTING, skb, NULL, skb->dst->dev, |
93 | xfrm6_output_finish); | 93 | xfrm6_output_finish); |
94 | } | 94 | } |
diff --git a/net/ipv6/xfrm6_state.c b/net/ipv6/xfrm6_state.c index df7e98d914fa..29e0d25b9e1e 100644 --- a/net/ipv6/xfrm6_state.c +++ b/net/ipv6/xfrm6_state.c | |||
@@ -188,7 +188,7 @@ static struct xfrm_state_afinfo xfrm6_state_afinfo = { | |||
188 | .family = AF_INET6, | 188 | .family = AF_INET6, |
189 | .proto = IPPROTO_IPV6, | 189 | .proto = IPPROTO_IPV6, |
190 | .eth_proto = htons(ETH_P_IPV6), | 190 | .eth_proto = htons(ETH_P_IPV6), |
191 | .nf_post_routing = NF_IP6_POST_ROUTING, | 191 | .nf_post_routing = NF_INET_POST_ROUTING, |
192 | .owner = THIS_MODULE, | 192 | .owner = THIS_MODULE, |
193 | .init_tempsel = __xfrm6_init_tempsel, | 193 | .init_tempsel = __xfrm6_init_tempsel, |
194 | .tmpl_sort = __xfrm6_tmpl_sort, | 194 | .tmpl_sort = __xfrm6_tmpl_sort, |