projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91e1908
)
[IPV6]: Do not change protocol for raw IPv6 sockets.
author
Denis V. Lunev
<den@openvz.org>
Wed, 4 Jun 2008 11:49:06 +0000
(15:49 +0400)
committer
YOSHIFUJI Hideaki
<yoshfuji@linux-ipv6.org>
Wed, 4 Jun 2008 19:02:37 +0000
(
04:02
+0900)
It is not allowed to change underlying protocol for
int fd = socket(PF_INET6, SOCK_RAW, IPPROTO_UDP);
Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
net/ipv6/ipv6_sockglue.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv6/ipv6_sockglue.c
b/net/ipv6/ipv6_sockglue.c
index 3eef8e5b3636ef1ba4d80d455619555dbbaa6109..1afe210d62861a295af673fcc0e3bad1d925a553 100644
(file)
--- a/
net/ipv6/ipv6_sockglue.c
+++ b/
net/ipv6/ipv6_sockglue.c
@@
-161,6
+161,9
@@
static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
struct ipv6_txoptions *opt;
struct sk_buff *pktopt;
+ if (sk->sk_type == SOCK_RAW)
+ break;
+
if (sk->sk_protocol != IPPROTO_UDP &&
sk->sk_protocol != IPPROTO_UDPLITE &&
sk->sk_protocol != IPPROTO_TCP)