Commit 4c752098 authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller
Browse files

[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: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bb4dbf9e
...@@ -299,8 +299,8 @@ struct ipv6_pinfo { ...@@ -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, ...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment