diff options
Diffstat (limited to 'include/linux/ipv6.h')
-rw-r--r-- | include/linux/ipv6.h | 48 |
1 files changed, 38 insertions, 10 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 134c8e5cf07c..10b666b61add 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -160,6 +160,9 @@ struct ipv6_devconf { | |||
160 | #ifdef CONFIG_IPV6_OPTIMISTIC_DAD | 160 | #ifdef CONFIG_IPV6_OPTIMISTIC_DAD |
161 | __s32 optimistic_dad; | 161 | __s32 optimistic_dad; |
162 | #endif | 162 | #endif |
163 | #ifdef CONFIG_IPV6_MROUTE | ||
164 | __s32 mc_forwarding; | ||
165 | #endif | ||
163 | void *sysctl; | 166 | void *sysctl; |
164 | }; | 167 | }; |
165 | 168 | ||
@@ -190,6 +193,7 @@ enum { | |||
190 | DEVCONF_PROXY_NDP, | 193 | DEVCONF_PROXY_NDP, |
191 | DEVCONF_OPTIMISTIC_DAD, | 194 | DEVCONF_OPTIMISTIC_DAD, |
192 | DEVCONF_ACCEPT_SOURCE_ROUTE, | 195 | DEVCONF_ACCEPT_SOURCE_ROUTE, |
196 | DEVCONF_MC_FORWARDING, | ||
193 | DEVCONF_MAX | 197 | DEVCONF_MAX |
194 | }; | 198 | }; |
195 | 199 | ||
@@ -230,6 +234,7 @@ struct inet6_skb_parm { | |||
230 | #endif | 234 | #endif |
231 | 235 | ||
232 | #define IP6SKB_XFRM_TRANSFORMED 1 | 236 | #define IP6SKB_XFRM_TRANSFORMED 1 |
237 | #define IP6SKB_FORWARDED 2 | ||
233 | }; | 238 | }; |
234 | 239 | ||
235 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) | 240 | #define IP6CB(skb) ((struct inet6_skb_parm*)((skb)->cb)) |
@@ -274,8 +279,29 @@ struct ipv6_pinfo { | |||
274 | 279 | ||
275 | __be32 flow_label; | 280 | __be32 flow_label; |
276 | __u32 frag_size; | 281 | __u32 frag_size; |
277 | __s16 hop_limit; | 282 | |
278 | __s16 mcast_hops; | 283 | /* |
284 | * Packed in 16bits. | ||
285 | * Omit one shift by by putting the signed field at MSB. | ||
286 | */ | ||
287 | #if defined(__BIG_ENDIAN_BITFIELD) | ||
288 | __s16 hop_limit:9; | ||
289 | __u16 __unused_1:7; | ||
290 | #else | ||
291 | __u16 __unused_1:7; | ||
292 | __s16 hop_limit:9; | ||
293 | #endif | ||
294 | |||
295 | #if defined(__BIG_ENDIAN_BITFIELD) | ||
296 | /* Packed in 16bits. */ | ||
297 | __s16 mcast_hops:9; | ||
298 | __u16 __unused_2:6, | ||
299 | mc_loop:1; | ||
300 | #else | ||
301 | __u16 mc_loop:1, | ||
302 | __unused_2:6; | ||
303 | __s16 mcast_hops:9; | ||
304 | #endif | ||
279 | int mcast_oif; | 305 | int mcast_oif; |
280 | 306 | ||
281 | /* pktoption flags */ | 307 | /* pktoption flags */ |
@@ -298,11 +324,14 @@ struct ipv6_pinfo { | |||
298 | } rxopt; | 324 | } rxopt; |
299 | 325 | ||
300 | /* sockopt flags */ | 326 | /* sockopt flags */ |
301 | __u8 mc_loop:1, | 327 | __u8 recverr:1, |
302 | recverr:1, | ||
303 | sndflow:1, | 328 | sndflow:1, |
304 | pmtudisc:2, | 329 | pmtudisc:2, |
305 | ipv6only:1; | 330 | ipv6only:1, |
331 | srcprefs:3; /* 001: prefer temporary address | ||
332 | * 010: prefer public address | ||
333 | * 100: prefer care-of address | ||
334 | */ | ||
306 | __u8 tclass; | 335 | __u8 tclass; |
307 | 336 | ||
308 | __u32 dst_cookie; | 337 | __u32 dst_cookie; |
@@ -315,9 +344,8 @@ struct ipv6_pinfo { | |||
315 | struct sk_buff *pktoptions; | 344 | struct sk_buff *pktoptions; |
316 | struct { | 345 | struct { |
317 | struct ipv6_txoptions *opt; | 346 | struct ipv6_txoptions *opt; |
318 | struct rt6_info *rt; | 347 | u8 hop_limit; |
319 | int hop_limit; | 348 | u8 tclass; |
320 | int tclass; | ||
321 | } cork; | 349 | } cork; |
322 | }; | 350 | }; |
323 | 351 | ||
@@ -458,7 +486,7 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk) | |||
458 | #endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ | 486 | #endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ |
459 | 487 | ||
460 | #define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\ | 488 | #define INET6_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif)\ |
461 | (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ | 489 | (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ |
462 | ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ | 490 | ((*((__portpair *)&(inet_sk(__sk)->dport))) == (__ports)) && \ |
463 | ((__sk)->sk_family == AF_INET6) && \ | 491 | ((__sk)->sk_family == AF_INET6) && \ |
464 | ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ | 492 | ipv6_addr_equal(&inet6_sk(__sk)->daddr, (__saddr)) && \ |
@@ -466,7 +494,7 @@ static inline struct raw6_sock *raw6_sk(const struct sock *sk) | |||
466 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) | 494 | (!((__sk)->sk_bound_dev_if) || ((__sk)->sk_bound_dev_if == (__dif)))) |
467 | 495 | ||
468 | #define INET6_TW_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif) \ | 496 | #define INET6_TW_MATCH(__sk, __net, __hash, __saddr, __daddr, __ports, __dif) \ |
469 | (((__sk)->sk_hash == (__hash)) && ((__sk)->sk_net == (__net)) && \ | 497 | (((__sk)->sk_hash == (__hash)) && sock_net((__sk)) == (__net) && \ |
470 | (*((__portpair *)&(inet_twsk(__sk)->tw_dport)) == (__ports)) && \ | 498 | (*((__portpair *)&(inet_twsk(__sk)->tw_dport)) == (__ports)) && \ |
471 | ((__sk)->sk_family == PF_INET6) && \ | 499 | ((__sk)->sk_family == PF_INET6) && \ |
472 | (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_daddr, (__saddr))) && \ | 500 | (ipv6_addr_equal(&inet6_twsk(__sk)->tw_v6_daddr, (__saddr))) && \ |