Skip to content

Commit

Permalink
[IPV6]: Make IPV6_{RECV,2292}RTHDR boolean options.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
YOSHIFUJI Hideaki authored and David S. Miller committed Jul 11, 2007
1 parent bb4dbf9 commit 4c75209
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/linux/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 2 additions & 6 deletions net/ipv6/ipv6_sockglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4c75209

Please sign in to comment.