]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[IPV6]: Make IPV6_{RECV,2292}RTHDR boolean options.
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Wed, 23 May 2007 04:28:48 +0000 (13:28 +0900)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 11 Jul 2007 05:56:31 +0000 (22:56 -0700)
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>
include/linux/ipv6.h
net/ipv6/ipv6_sockglue.c

index cb3118cf277c67ea49b23a32209e45e2ea1d3032..97983dc9df131ada19207e54a0371d700912c41c 100644 (file)
@@ -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,
index 1841714ac4199377cb9cc99ab26aeb234cd9a3d3..d6846393182d4294dc08f30d9fa99921dd881319 100644 (file)
@@ -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;