diff options
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r-- | net/ipv6/exthdrs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 6447dc49429f..fa3d9c328092 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
@@ -791,14 +791,14 @@ static int ipv6_renew_option(void *ohdr, | |||
791 | if (ohdr) { | 791 | if (ohdr) { |
792 | memcpy(*p, ohdr, ipv6_optlen((struct ipv6_opt_hdr *)ohdr)); | 792 | memcpy(*p, ohdr, ipv6_optlen((struct ipv6_opt_hdr *)ohdr)); |
793 | *hdr = (struct ipv6_opt_hdr *)*p; | 793 | *hdr = (struct ipv6_opt_hdr *)*p; |
794 | *p += CMSG_ALIGN(ipv6_optlen(*(struct ipv6_opt_hdr **)hdr)); | 794 | *p += CMSG_ALIGN(ipv6_optlen(*hdr)); |
795 | } | 795 | } |
796 | } else { | 796 | } else { |
797 | if (newopt) { | 797 | if (newopt) { |
798 | if (copy_from_user(*p, newopt, newoptlen)) | 798 | if (copy_from_user(*p, newopt, newoptlen)) |
799 | return -EFAULT; | 799 | return -EFAULT; |
800 | *hdr = (struct ipv6_opt_hdr *)*p; | 800 | *hdr = (struct ipv6_opt_hdr *)*p; |
801 | if (ipv6_optlen(*(struct ipv6_opt_hdr **)hdr) > newoptlen) | 801 | if (ipv6_optlen(*hdr) > newoptlen) |
802 | return -EINVAL; | 802 | return -EINVAL; |
803 | *p += CMSG_ALIGN(newoptlen); | 803 | *p += CMSG_ALIGN(newoptlen); |
804 | } | 804 | } |