diff options
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index a7fdf9a27f15..f5e0682b402d 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -315,6 +315,9 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
315 | goto e_inval; | 315 | goto e_inval; |
316 | if (val < -1 || val > 0xff) | 316 | if (val < -1 || val > 0xff) |
317 | goto e_inval; | 317 | goto e_inval; |
318 | /* RFC 3542, 6.5: default traffic class of 0x0 */ | ||
319 | if (val == -1) | ||
320 | val = 0; | ||
318 | np->tclass = val; | 321 | np->tclass = val; |
319 | retv = 0; | 322 | retv = 0; |
320 | break; | 323 | break; |
@@ -1037,8 +1040,6 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
1037 | 1040 | ||
1038 | case IPV6_TCLASS: | 1041 | case IPV6_TCLASS: |
1039 | val = np->tclass; | 1042 | val = np->tclass; |
1040 | if (val < 0) | ||
1041 | val = 0; | ||
1042 | break; | 1043 | break; |
1043 | 1044 | ||
1044 | case IPV6_RECVTCLASS: | 1045 | case IPV6_RECVTCLASS: |