We have a socket option guarded by ifdef _KERNEL that therefore cannot be used
by userland (nor used in kernel). No pcb code tests for the flag either.

Index: netinet/in_pcb.h
===================================================================
RCS file: /cvs/src/sys/netinet/in_pcb.h,v
retrieving revision 1.91
diff -u -p -r1.91 in_pcb.h
--- netinet/in_pcb.h    24 Oct 2015 16:08:48 -0000      1.91
+++ netinet/in_pcb.h    2 Dec 2015 17:48:17 -0000
@@ -196,7 +196,6 @@ struct inpcbtable {
 #define IN6P_HOPOPTS           0x040000 /* receive hop-by-hop options */
 #define IN6P_DSTOPTS           0x080000 /* receive dst options after rthdr */
 #define IN6P_RTHDR             0x100000 /* receive routing header */
-#define IN6P_RTHDRDSTOPTS      0x200000 /* receive dstoptions before rthdr */
 #define IN6P_TCLASS            0x400000 /* receive traffic class value */
 #define IN6P_AUTOFLOWLABEL     0x800000 /* attach flowlabel automatically */
 
@@ -207,7 +206,7 @@ struct inpcbtable {
 #define IN6P_MINMTU            0x20000000 /* use minimum MTU */
 
 #define IN6P_CONTROLOPTS       (IN6P_PKTINFO|IN6P_HOPLIMIT|IN6P_HOPOPTS|\
-                                IN6P_DSTOPTS|IN6P_RTHDR|IN6P_RTHDRDSTOPTS|\
+                                IN6P_DSTOPTS|IN6P_RTHDR|\
                                 IN6P_TCLASS|IN6P_AUTOFLOWLABEL|IN6P_RFC2292|\
                                 IN6P_MTU|IN6P_RECVDSTPORT)
 
Index: netinet6/in6.h
===================================================================
RCS file: /cvs/src/sys/netinet6/in6.h,v
retrieving revision 1.86
diff -u -p -r1.86 in6.h
--- netinet6/in6.h      29 Oct 2015 16:04:10 -0000      1.86
+++ netinet6/in6.h      2 Dec 2015 17:47:02 -0000
@@ -315,9 +315,6 @@ struct route_in6 {
 #define IPV6_RECVRTHDR         38 /* bool; recv routing header */
 #define IPV6_RECVHOPOPTS       39 /* bool; recv hop-by-hop option */
 #define IPV6_RECVDSTOPTS       40 /* bool; recv dst option after rthdr */
-#ifdef _KERNEL
-#define IPV6_RECVRTHDRDSTOPTS  41 /* bool; recv dst option before rthdr */
-#endif
 
 #define IPV6_USE_MIN_MTU       42 /* bool; send packets at the minimum MTU */
 #define IPV6_RECVPATHMTU       43 /* bool; notify an according MTU */
Index: netinet6/ip6_output.c
===================================================================
RCS file: /cvs/src/sys/netinet6/ip6_output.c,v
retrieving revision 1.200
diff -u -p -r1.200 ip6_output.c
--- netinet6/ip6_output.c       29 Nov 2015 15:12:36 -0000      1.200
+++ netinet6/ip6_output.c       2 Dec 2015 17:47:34 -0000
@@ -1229,7 +1229,6 @@ ip6_ctloutput(int op, struct socket *so,
                         */
                        case IPV6_RECVHOPOPTS:
                        case IPV6_RECVDSTOPTS:
-                       case IPV6_RECVRTHDRDSTOPTS:
                                if (!privileged) {
                                        error = EPERM;
                                        break;
@@ -1299,10 +1298,6 @@ do { \
                                        OPTSET(IN6P_DSTOPTS);
                                        break;
 
-                               case IPV6_RECVRTHDRDSTOPTS:
-                                       OPTSET(IN6P_RTHDRDSTOPTS);
-                                       break;
-
                                case IPV6_RECVRTHDR:
                                        OPTSET(IN6P_RTHDR);
                                        break;
@@ -1538,7 +1533,6 @@ do { \
 
                        case IPV6_RECVHOPOPTS:
                        case IPV6_RECVDSTOPTS:
-                       case IPV6_RECVRTHDRDSTOPTS:
                        case IPV6_UNICAST_HOPS:
                        case IPV6_RECVPKTINFO:
                        case IPV6_RECVHOPLIMIT:
@@ -1558,10 +1552,6 @@ do { \
 
                                case IPV6_RECVDSTOPTS:
                                        optval = OPTBIT(IN6P_DSTOPTS);
-                                       break;
-
-                               case IPV6_RECVRTHDRDSTOPTS:
-                                       optval = OPTBIT(IN6P_RTHDRDSTOPTS);
                                        break;
 
                                case IPV6_UNICAST_HOPS:

Reply via email to