diff options
author | Masahide NAKAMURA <nakam@linux-ipv6.org> | 2006-08-23 22:17:12 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:06:49 -0400 |
commit | 280a9d340057ce1b3cca63084df22f4ef5b35fba (patch) | |
tree | fc41839e13cc27f8f3607f829202f1e46cc52e87 /net | |
parent | 65d4ed92219b28875efb52de5700da8c3dfa83e1 (diff) |
[IPV6] MIP6: Add socket option and ancillary data interface of routing header type 2.
Add socket option and ancillary data interface of routing header type
2. Mobile IPv6 application will use this to send binding
acknowledgement with the header without relation of confirmed route
optimization (binding).
Based on MIPL2 kernel patch.
Signed-off-by: Masahide NAKAMURA <nakam@linux-ipv6.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/datagram.c | 11 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 10 |
2 files changed, 16 insertions, 5 deletions
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index 8561b9da6db6..7206747022fc 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
@@ -648,10 +648,13 @@ int datagram_send_ctl(struct msghdr *msg, struct flowi *fl, | |||
648 | 648 | ||
649 | rthdr = (struct ipv6_rt_hdr *)CMSG_DATA(cmsg); | 649 | rthdr = (struct ipv6_rt_hdr *)CMSG_DATA(cmsg); |
650 | 650 | ||
651 | /* | 651 | switch (rthdr->type) { |
652 | * TYPE 0 | 652 | case IPV6_SRCRT_TYPE_0: |
653 | */ | 653 | #ifdef CONFIG_IPV6_MIP6 |
654 | if (rthdr->type) { | 654 | case IPV6_SRCRT_TYPE_2: |
655 | #endif | ||
656 | break; | ||
657 | default: | ||
655 | err = -EINVAL; | 658 | err = -EINVAL; |
656 | goto exit_f; | 659 | goto exit_f; |
657 | } | 660 | } |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index a5eaaf693abf..4f3bb7fcc8b5 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -407,8 +407,16 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
407 | /* routing header option needs extra check */ | 407 | /* routing header option needs extra check */ |
408 | if (optname == IPV6_RTHDR && opt->srcrt) { | 408 | if (optname == IPV6_RTHDR && opt->srcrt) { |
409 | struct ipv6_rt_hdr *rthdr = opt->srcrt; | 409 | struct ipv6_rt_hdr *rthdr = opt->srcrt; |
410 | if (rthdr->type) | 410 | switch (rthdr->type) { |
411 | case IPV6_SRCRT_TYPE_0: | ||
412 | #ifdef CONFIG_IPV6_MIP6 | ||
413 | case IPV6_SRCRT_TYPE_2: | ||
414 | #endif | ||
415 | break; | ||
416 | default: | ||
411 | goto sticky_done; | 417 | goto sticky_done; |
418 | } | ||
419 | |||
412 | if ((rthdr->hdrlen & 1) || | 420 | if ((rthdr->hdrlen & 1) || |
413 | (rthdr->hdrlen >> 1) != rthdr->segments_left) | 421 | (rthdr->hdrlen >> 1) != rthdr->segments_left) |
414 | goto sticky_done; | 422 | goto sticky_done; |