Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/netinet6/ip6_input.c,v retrieving revision 1.122.4.1 retrieving revision 1.123 diff -u -p -r1.122.4.1 -r1.123 --- src/sys/netinet6/ip6_input.c 2009/05/03 13:22:22 1.122.4.1 +++ src/sys/netinet6/ip6_input.c 2009/01/19 02:27:57 1.123 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_input.c,v 1.122.4.1 2009/05/03 13:22:22 bouyer Exp $ */ +/* $NetBSD: ip6_input.c,v 1.123 2009/01/19 02:27:57 christos Exp $ */ /* $KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $ */ /* @@ -62,12 +62,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.122.4.1 2009/05/03 13:22:22 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.123 2009/01/19 02:27:57 christos Exp $"); #include "opt_inet.h" #include "opt_inet6.h" #include "opt_ipsec.h" #include "opt_pfil_hooks.h" +#include "opt_compat_netbsd.h" #include #include @@ -120,6 +121,11 @@ __KERNEL_RCSID(0, "$NetBSD: ip6_input.c, #include #endif /* FAST_IPSEC */ +#ifdef COMPAT_50 +#include +#include +#endif + #include #include "faith.h" @@ -1102,17 +1108,27 @@ ip6_savecontrol(struct in6pcb *in6p, str #define IS2292(x, y) (y) #endif -#ifdef SO_TIMESTAMP - if (in6p->in6p_socket->so_options & SO_TIMESTAMP) { + if (in6p->in6p_socket->so_options & SO_TIMESTAMP +#ifdef SO_OTIMESTAMP + || in6p->in6p_socket->so_options & SO_OTIMESTAMP +#endif + ) { struct timeval tv; microtime(&tv); +#ifdef SO_OTIMESTAMP + if (in6p->in6p_socket->so_options & SO_OTIMESTAMP) { + struct timeval50 tv50; + timeval_to_timeval50(&tv, &tv50); + *mp = sbcreatecontrol((void *) &tv50, sizeof(tv50), + SCM_OTIMESTAMP, SOL_SOCKET); + } else +#endif *mp = sbcreatecontrol((void *) &tv, sizeof(tv), SCM_TIMESTAMP, SOL_SOCKET); if (*mp) mp = &(*mp)->m_next; } -#endif /* some OSes call this logic with IPv4 packet, for SO_TIMESTAMP */ if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) @@ -1257,7 +1273,7 @@ ip6_savecontrol(struct in6pcb *in6p, str switch (nxt) { case IPPROTO_DSTOPTS: - if (!(in6p->in6p_flags & IN6P_DSTOPTS)) + if (!in6p->in6p_flags & IN6P_DSTOPTS) break; *mp = sbcreatecontrol((void *)ip6e, elen, @@ -1268,7 +1284,7 @@ ip6_savecontrol(struct in6pcb *in6p, str break; case IPPROTO_ROUTING: - if (!(in6p->in6p_flags & IN6P_RTHDR)) + if (!in6p->in6p_flags & IN6P_RTHDR) break; *mp = sbcreatecontrol((void *)ip6e, elen,