diff options
author | Jesse Gross <jesse@nicira.com> | 2012-11-09 20:05:07 -0500 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2012-11-09 20:05:07 -0500 |
commit | f8f626754ebeca613cf1af2e6f890cfde0e74d5b (patch) | |
tree | 359723681fd28b4c6c523229dcf5c6c3fadfd60c /net/netfilter | |
parent | c0618533815d8d92b270f03c11042ea53a8045d2 (diff) |
ipv6: Move ipv6_find_hdr() out of Netfilter code.
Open vSwitch will soon also use ipv6_find_hdr() so this moves it
out of Netfilter-specific code into a more common location.
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/xt_HMARK.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netfilter/xt_HMARK.c b/net/netfilter/xt_HMARK.c index 1686ca1b53a..73b73f687c5 100644 --- a/net/netfilter/xt_HMARK.c +++ b/net/netfilter/xt_HMARK.c | |||
@@ -167,7 +167,7 @@ hmark_pkt_set_htuple_ipv6(const struct sk_buff *skb, struct hmark_tuple *t, | |||
167 | const struct xt_hmark_info *info) | 167 | const struct xt_hmark_info *info) |
168 | { | 168 | { |
169 | struct ipv6hdr *ip6, _ip6; | 169 | struct ipv6hdr *ip6, _ip6; |
170 | int flag = IP6T_FH_F_AUTH; | 170 | int flag = IP6_FH_F_AUTH; |
171 | unsigned int nhoff = 0; | 171 | unsigned int nhoff = 0; |
172 | u16 fragoff = 0; | 172 | u16 fragoff = 0; |
173 | int nexthdr; | 173 | int nexthdr; |
@@ -177,7 +177,7 @@ hmark_pkt_set_htuple_ipv6(const struct sk_buff *skb, struct hmark_tuple *t, | |||
177 | if (nexthdr < 0) | 177 | if (nexthdr < 0) |
178 | return 0; | 178 | return 0; |
179 | /* No need to check for icmp errors on fragments */ | 179 | /* No need to check for icmp errors on fragments */ |
180 | if ((flag & IP6T_FH_F_FRAG) || (nexthdr != IPPROTO_ICMPV6)) | 180 | if ((flag & IP6_FH_F_FRAG) || (nexthdr != IPPROTO_ICMPV6)) |
181 | goto noicmp; | 181 | goto noicmp; |
182 | /* Use inner header in case of ICMP errors */ | 182 | /* Use inner header in case of ICMP errors */ |
183 | if (get_inner6_hdr(skb, &nhoff)) { | 183 | if (get_inner6_hdr(skb, &nhoff)) { |
@@ -185,7 +185,7 @@ hmark_pkt_set_htuple_ipv6(const struct sk_buff *skb, struct hmark_tuple *t, | |||
185 | if (ip6 == NULL) | 185 | if (ip6 == NULL) |
186 | return -1; | 186 | return -1; |
187 | /* If AH present, use SPI like in ESP. */ | 187 | /* If AH present, use SPI like in ESP. */ |
188 | flag = IP6T_FH_F_AUTH; | 188 | flag = IP6_FH_F_AUTH; |
189 | nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag); | 189 | nexthdr = ipv6_find_hdr(skb, &nhoff, -1, &fragoff, &flag); |
190 | if (nexthdr < 0) | 190 | if (nexthdr < 0) |
191 | return -1; | 191 | return -1; |
@@ -201,7 +201,7 @@ noicmp: | |||
201 | if (t->proto == IPPROTO_ICMPV6) | 201 | if (t->proto == IPPROTO_ICMPV6) |
202 | return 0; | 202 | return 0; |
203 | 203 | ||
204 | if (flag & IP6T_FH_F_FRAG) | 204 | if (flag & IP6_FH_F_FRAG) |
205 | return 0; | 205 | return 0; |
206 | 206 | ||
207 | hmark_set_tuple_ports(skb, nhoff, t, info); | 207 | hmark_set_tuple_ports(skb, nhoff, t, info); |