| version 1.97, 2007/03/04 06:03:26 |
version 1.98, 2007/03/07 22:20:04 |
|
|
| ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR; |
ip6_desync_factor = arc4random() % MAX_TEMP_DESYNC_FACTOR; |
| |
|
| ip6_init2((void *)0); |
ip6_init2((void *)0); |
| |
#ifdef GATEWAY |
| |
ip6flow_init(); |
| |
#endif |
| |
|
| #ifdef PFIL_HOOKS |
#ifdef PFIL_HOOKS |
| /* Register our Packet Filter hook. */ |
/* Register our Packet Filter hook. */ |
| Line 324 ip6_input(struct mbuf *m) |
|
| Line 327 ip6_input(struct mbuf *m) |
|
| goto bad; |
goto bad; |
| } |
} |
| |
|
| |
#if defined(IPSEC) |
| |
/* IPv6 fast forwarding is not compatible with IPsec. */ |
| |
m->m_flags &= ~M_CANFASTFWD; |
| |
#else |
| |
/* |
| |
* Assume that we can create a fast-forward IP flow entry |
| |
* based on this packet. |
| |
*/ |
| |
m->m_flags |= M_CANFASTFWD; |
| |
#endif |
| |
|
| #ifdef PFIL_HOOKS |
#ifdef PFIL_HOOKS |
| /* |
/* |
| * Run through list of hooks for input packets. If there are any |
* Run through list of hooks for input packets. If there are any |
|
|
| m_tag_delete(m, mtag); |
m_tag_delete(m, mtag); |
| } |
} |
| |
|
| |
#ifdef GATEWAY |
| |
/* |
| |
* sysctl helper routine for net.inet.ip6.maxflows. Since |
| |
* we could reduce this value, call ip6flow_reap(); |
| |
*/ |
| |
static int |
| |
sysctl_net_inet_ip6_maxflows(SYSCTLFN_ARGS) |
| |
{ |
| |
int s; |
| |
|
| |
s = sysctl_lookup(SYSCTLFN_CALL(rnode)); |
| |
if (s) |
| |
return (s); |
| |
|
| |
s = splsoftnet(); |
| |
ip6flow_reap(0); |
| |
splx(s); |
| |
|
| |
return (0); |
| |
} |
| |
#endif /* GATEWAY */ |
| |
|
| /* |
/* |
| * System control for IP6 |
* System control for IP6 |
| */ |
*/ |
| Line 1874 SYSCTL_SETUP(sysctl_net_inet6_ip6_setup, |
|
| Line 1910 SYSCTL_SETUP(sysctl_net_inet6_ip6_setup, |
|
| NULL, 0, &ip6_mcast_pmtu, 0, |
NULL, 0, &ip6_mcast_pmtu, 0, |
| CTL_NET, PF_INET6, IPPROTO_IPV6, |
CTL_NET, PF_INET6, IPPROTO_IPV6, |
| CTL_CREATE, CTL_EOL); |
CTL_CREATE, CTL_EOL); |
| |
#ifdef GATEWAY |
| |
sysctl_createv(clog, 0, NULL, NULL, |
| |
CTLFLAG_PERMANENT|CTLFLAG_READWRITE, |
| |
CTLTYPE_INT, "maxflows", |
| |
SYSCTL_DESCR("Number of flows for fast forwarding (IPv6)"), |
| |
sysctl_net_inet_ip6_maxflows, 0, &ip6_maxflows, 0, |
| |
CTL_NET, PF_INET6, IPPROTO_IPV6, |
| |
CTL_CREATE, CTL_EOL); |
| |
#endif |
| } |
} |