diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv6/raw.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ecca8aae3c4b..d09329ca3267 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -609,6 +609,9 @@ static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) | |||
609 | struct iovec *iov; | 609 | struct iovec *iov; |
610 | u8 __user *type = NULL; | 610 | u8 __user *type = NULL; |
611 | u8 __user *code = NULL; | 611 | u8 __user *code = NULL; |
612 | #ifdef CONFIG_IPV6_MIP6 | ||
613 | u8 len = 0; | ||
614 | #endif | ||
612 | int probed = 0; | 615 | int probed = 0; |
613 | int i; | 616 | int i; |
614 | 617 | ||
@@ -640,6 +643,20 @@ static void rawv6_probe_proto_opt(struct flowi *fl, struct msghdr *msg) | |||
640 | probed = 1; | 643 | probed = 1; |
641 | } | 644 | } |
642 | break; | 645 | break; |
646 | #ifdef CONFIG_IPV6_MIP6 | ||
647 | case IPPROTO_MH: | ||
648 | if (iov->iov_base && iov->iov_len < 1) | ||
649 | break; | ||
650 | /* check if type field is readable or not. */ | ||
651 | if (iov->iov_len > 2 - len) { | ||
652 | u8 __user *p = iov->iov_base; | ||
653 | get_user(fl->fl_mh_type, &p[2 - len]); | ||
654 | probed = 1; | ||
655 | } else | ||
656 | len += iov->iov_len; | ||
657 | |||
658 | break; | ||
659 | #endif | ||
643 | default: | 660 | default: |
644 | probed = 1; | 661 | probed = 1; |
645 | break; | 662 | break; |