[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:
Родитель
bb4dbf9e61
Коммит
4c752098f5
|
@ -299,8 +299,8 @@ struct ipv6_pinfo {
|
|||
/* pktoption flags */
|
||||
union {
|
||||
struct {
|
||||
__u16 srcrt:2,
|
||||
osrcrt:2,
|
||||
__u16 srcrt:1,
|
||||
osrcrt:1,
|
||||
rxinfo:1,
|
||||
rxoinfo:1,
|
||||
rxhlim:1,
|
||||
|
|
|
@ -336,16 +336,12 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,
|
|||
break;
|
||||
|
||||
case IPV6_RECVRTHDR:
|
||||
if (val < 0 || val > 2)
|
||||
goto e_inval;
|
||||
np->rxopt.bits.srcrt = val;
|
||||
np->rxopt.bits.srcrt = valbool;
|
||||
retv = 0;
|
||||
break;
|
||||
|
||||
case IPV6_2292RTHDR:
|
||||
if (val < 0 || val > 2)
|
||||
goto e_inval;
|
||||
np->rxopt.bits.osrcrt = val;
|
||||
np->rxopt.bits.osrcrt = valbool;
|
||||
retv = 0;
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче