| version 1.122.4.1, 2009/05/03 13:22:22 |
version 1.123, 2009/01/19 02:27:57 |
| Line 68 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| Line 68 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| #include "opt_inet6.h" |
#include "opt_inet6.h" |
| #include "opt_ipsec.h" |
#include "opt_ipsec.h" |
| #include "opt_pfil_hooks.h" |
#include "opt_pfil_hooks.h" |
| |
#include "opt_compat_netbsd.h" |
| |
|
| #include <sys/param.h> |
#include <sys/param.h> |
| #include <sys/systm.h> |
#include <sys/systm.h> |
| Line 120 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| Line 121 __KERNEL_RCSID(0, "$NetBSD$"); |
|
| #include <netipsec/key.h> |
#include <netipsec/key.h> |
| #endif /* FAST_IPSEC */ |
#endif /* FAST_IPSEC */ |
| |
|
| |
#ifdef COMPAT_50 |
| |
#include <compat/sys/time.h> |
| |
#include <compat/sys/socket.h> |
| |
#endif |
| |
|
| #include <netinet6/ip6protosw.h> |
#include <netinet6/ip6protosw.h> |
| |
|
| #include "faith.h" |
#include "faith.h" |
| Line 1102 ip6_savecontrol(struct in6pcb *in6p, str |
|
| Line 1108 ip6_savecontrol(struct in6pcb *in6p, str |
|
| #define IS2292(x, y) (y) |
#define IS2292(x, y) (y) |
| #endif |
#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; |
struct timeval tv; |
| |
|
| microtime(&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), |
*mp = sbcreatecontrol((void *) &tv, sizeof(tv), |
| SCM_TIMESTAMP, SOL_SOCKET); |
SCM_TIMESTAMP, SOL_SOCKET); |
| if (*mp) |
if (*mp) |
| mp = &(*mp)->m_next; |
mp = &(*mp)->m_next; |
| } |
} |
| #endif |
|
| |
|
| /* some OSes call this logic with IPv4 packet, for SO_TIMESTAMP */ |
/* some OSes call this logic with IPv4 packet, for SO_TIMESTAMP */ |
| if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) |
if ((ip6->ip6_vfc & IPV6_VERSION_MASK) != IPV6_VERSION) |
| Line 1257 ip6_savecontrol(struct in6pcb *in6p, str |
|
| Line 1273 ip6_savecontrol(struct in6pcb *in6p, str |
|
| |
|
| switch (nxt) { |
switch (nxt) { |
| case IPPROTO_DSTOPTS: |
case IPPROTO_DSTOPTS: |
| if (!(in6p->in6p_flags & IN6P_DSTOPTS)) |
if (!in6p->in6p_flags & IN6P_DSTOPTS) |
| break; |
break; |
| |
|
| *mp = sbcreatecontrol((void *)ip6e, elen, |
*mp = sbcreatecontrol((void *)ip6e, elen, |
| Line 1268 ip6_savecontrol(struct in6pcb *in6p, str |
|
| Line 1284 ip6_savecontrol(struct in6pcb *in6p, str |
|
| break; |
break; |
| |
|
| case IPPROTO_ROUTING: |
case IPPROTO_ROUTING: |
| if (!(in6p->in6p_flags & IN6P_RTHDR)) |
if (!in6p->in6p_flags & IN6P_RTHDR) |
| break; |
break; |
| |
|
| *mp = sbcreatecontrol((void *)ip6e, elen, |
*mp = sbcreatecontrol((void *)ip6e, elen, |