diff options
Diffstat (limited to 'net/ipv6/raw.c')
-rw-r--r-- | net/ipv6/raw.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index e677937a07fc..45e6efb7f171 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -764,7 +764,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
764 | return -EINVAL; | 764 | return -EINVAL; |
765 | 765 | ||
766 | if (sin6->sin6_family && sin6->sin6_family != AF_INET6) | 766 | if (sin6->sin6_family && sin6->sin6_family != AF_INET6) |
767 | return(-EAFNOSUPPORT); | 767 | return -EAFNOSUPPORT; |
768 | 768 | ||
769 | /* port is the proto value [0..255] carried in nexthdr */ | 769 | /* port is the proto value [0..255] carried in nexthdr */ |
770 | proto = ntohs(sin6->sin6_port); | 770 | proto = ntohs(sin6->sin6_port); |
@@ -772,10 +772,10 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
772 | if (!proto) | 772 | if (!proto) |
773 | proto = inet->inet_num; | 773 | proto = inet->inet_num; |
774 | else if (proto != inet->inet_num) | 774 | else if (proto != inet->inet_num) |
775 | return(-EINVAL); | 775 | return -EINVAL; |
776 | 776 | ||
777 | if (proto > 255) | 777 | if (proto > 255) |
778 | return(-EINVAL); | 778 | return -EINVAL; |
779 | 779 | ||
780 | daddr = &sin6->sin6_addr; | 780 | daddr = &sin6->sin6_addr; |
781 | if (np->sndflow) { | 781 | if (np->sndflow) { |
@@ -985,7 +985,7 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, | |||
985 | /* You may get strange result with a positive odd offset; | 985 | /* You may get strange result with a positive odd offset; |
986 | RFC2292bis agrees with me. */ | 986 | RFC2292bis agrees with me. */ |
987 | if (val > 0 && (val&1)) | 987 | if (val > 0 && (val&1)) |
988 | return(-EINVAL); | 988 | return -EINVAL; |
989 | if (val < 0) { | 989 | if (val < 0) { |
990 | rp->checksum = 0; | 990 | rp->checksum = 0; |
991 | } else { | 991 | } else { |
@@ -997,7 +997,7 @@ static int do_rawv6_setsockopt(struct sock *sk, int level, int optname, | |||
997 | break; | 997 | break; |
998 | 998 | ||
999 | default: | 999 | default: |
1000 | return(-ENOPROTOOPT); | 1000 | return -ENOPROTOOPT; |
1001 | } | 1001 | } |
1002 | } | 1002 | } |
1003 | 1003 | ||
@@ -1190,7 +1190,7 @@ static int rawv6_init_sk(struct sock *sk) | |||
1190 | default: | 1190 | default: |
1191 | break; | 1191 | break; |
1192 | } | 1192 | } |
1193 | return(0); | 1193 | return 0; |
1194 | } | 1194 | } |
1195 | 1195 | ||
1196 | struct proto rawv6_prot = { | 1196 | struct proto rawv6_prot = { |