diff options
-rw-r--r-- | include/linux/ipv6.h | 4 | ||||
-rw-r--r-- | net/ipv6/ipv6_sockglue.c | 8 |
2 files changed, 4 insertions, 8 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index cb3118cf277c..97983dc9df13 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -299,8 +299,8 @@ struct ipv6_pinfo { | |||
299 | /* pktoption flags */ | 299 | /* pktoption flags */ |
300 | union { | 300 | union { |
301 | struct { | 301 | struct { |
302 | __u16 srcrt:2, | 302 | __u16 srcrt:1, |
303 | osrcrt:2, | 303 | osrcrt:1, |
304 | rxinfo:1, | 304 | rxinfo:1, |
305 | rxoinfo:1, | 305 | rxoinfo:1, |
306 | rxhlim:1, | 306 | rxhlim:1, |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 1841714ac419..d6846393182d 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -336,16 +336,12 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname, | |||
336 | break; | 336 | break; |
337 | 337 | ||
338 | case IPV6_RECVRTHDR: | 338 | case IPV6_RECVRTHDR: |
339 | if (val < 0 || val > 2) | 339 | np->rxopt.bits.srcrt = valbool; |
340 | goto e_inval; | ||
341 | np->rxopt.bits.srcrt = val; | ||
342 | retv = 0; | 340 | retv = 0; |
343 | break; | 341 | break; |
344 | 342 | ||
345 | case IPV6_2292RTHDR: | 343 | case IPV6_2292RTHDR: |
346 | if (val < 0 || val > 2) | 344 | np->rxopt.bits.osrcrt = valbool; |
347 | goto e_inval; | ||
348 | np->rxopt.bits.osrcrt = val; | ||
349 | retv = 0; | 345 | retv = 0; |
350 | break; | 346 | break; |
351 | 347 | ||