mirror of
https://github.com/adulau/aha.git
synced 2025-01-02 14:13:18 +00:00
[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>
This commit is contained in:
parent
bb4dbf9e61
commit
4c752098f5
2 changed files with 4 additions and 8 deletions
|
@ -299,8 +299,8 @@ struct ipv6_pinfo {
|
||||||
/* pktoption flags */
|
/* pktoption flags */
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
__u16 srcrt:2,
|
__u16 srcrt:1,
|
||||||
osrcrt:2,
|
osrcrt:1,
|
||||||
rxinfo:1,
|
rxinfo:1,
|
||||||
rxoinfo:1,
|
rxoinfo:1,
|
||||||
rxhlim:1,
|
rxhlim:1,
|
||||||
|
|
|
@ -336,16 +336,12 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPV6_RECVRTHDR:
|
case IPV6_RECVRTHDR:
|
||||||
if (val < 0 || val > 2)
|
np->rxopt.bits.srcrt = valbool;
|
||||||
goto e_inval;
|
|
||||||
np->rxopt.bits.srcrt = val;
|
|
||||||
retv = 0;
|
retv = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IPV6_2292RTHDR:
|
case IPV6_2292RTHDR:
|
||||||
if (val < 0 || val > 2)
|
np->rxopt.bits.osrcrt = valbool;
|
||||||
goto e_inval;
|
|
||||||
np->rxopt.bits.osrcrt = val;
|
|
||||||
retv = 0;
|
retv = 0;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue