git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[IPV6]: Accept -1 for IPV6_TCLASS
[safe/jmp/linux-2.6]
/
net
/
ipv6
/
ipv6_sockglue.c
diff --git
a/net/ipv6/ipv6_sockglue.c
b/net/ipv6/ipv6_sockglue.c
index
4332726
..
a5eaaf6
100644
(file)
--- a/
net/ipv6/ipv6_sockglue.c
+++ b/
net/ipv6/ipv6_sockglue.c
@@
-362,7
+362,7
@@
static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
break;
case IPV6_TCLASS:
- if (val <
0
|| val > 0xff)
+ if (val <
-1
|| val > 0xff)
goto e_inval;
np->tclass = val;
retv = 0;
@@
-947,6
+947,8
@@
static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,
case IPV6_TCLASS:
val = np->tclass;
+ if (val < 0)
+ val = 0;
break;
case IPV6_RECVTCLASS: