Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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,
+2 −6
Original line number Diff line number Diff line
@@ -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;