Commit 4c752098f529f41abfc985426a3eca0f2cb96676
Committed by
David S. Miller
1 parent
bb4dbf9e61
Exists in
master
and in
7 other branches
[IPV6]: Make IPV6_{RECV,2292}RTHDR boolean options.
Because reversing RH0 is no longer supported by deprecation of RH0, let's make IPV6_{RECV,2292}RTHDR boolean options. Boolean are more appropriate from standard POV. Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 2 changed files with 4 additions and 8 deletions Side-by-side Diff
include/linux/ipv6.h
net/ipv6/ipv6_sockglue.c
... | ... | @@ -336,16 +336,12 @@ |
336 | 336 | break; |
337 | 337 | |
338 | 338 | case IPV6_RECVRTHDR: |
339 | - if (val < 0 || val > 2) | |
340 | - goto e_inval; | |
341 | - np->rxopt.bits.srcrt = val; | |
339 | + np->rxopt.bits.srcrt = valbool; | |
342 | 340 | retv = 0; |
343 | 341 | break; |
344 | 342 | |
345 | 343 | case IPV6_2292RTHDR: |
346 | - if (val < 0 || val > 2) | |
347 | - goto e_inval; | |
348 | - np->rxopt.bits.osrcrt = val; | |
344 | + np->rxopt.bits.osrcrt = valbool; | |
349 | 345 | retv = 0; |
350 | 346 | break; |
351 | 347 |