version 1.52.2.1, 2002/05/30 13:52:32 |
version 1.52.4.1, 2003/10/19 10:01:31 |
|
|
{ |
{ |
struct ip6protosw *pr; |
struct ip6protosw *pr; |
int i; |
int i; |
|
struct timeval tv; |
|
|
pr = (struct ip6protosw *)pffindproto(PF_INET6, IPPROTO_RAW, SOCK_RAW); |
pr = (struct ip6protosw *)pffindproto(PF_INET6, IPPROTO_RAW, SOCK_RAW); |
if (pr == 0) |
if (pr == 0) |
|
|
ip6intrq.ifq_maxlen = ip6qmaxlen; |
ip6intrq.ifq_maxlen = ip6qmaxlen; |
nd6_init(); |
nd6_init(); |
frag6_init(); |
frag6_init(); |
ip6_flow_seq = arc4random(); |
/* |
|
* in many cases, random() here does NOT return random number |
|
* as initialization during bootstrap time occur in fixed order. |
|
*/ |
|
microtime(&tv); |
|
ip6_flow_seq = random() ^ tv.tv_usec; |
|
|
ip6_init2((void *)0); |
ip6_init2((void *)0); |
|
|
Line 1306 ip6_nexthdr(m, off, proto, nxtp) |
|
Line 1312 ip6_nexthdr(m, off, proto, nxtp) |
|
if (m->m_pkthdr.len < off + sizeof(fh)) |
if (m->m_pkthdr.len < off + sizeof(fh)) |
return -1; |
return -1; |
m_copydata(m, off, sizeof(fh), (caddr_t)&fh); |
m_copydata(m, off, sizeof(fh), (caddr_t)&fh); |
if ((ntohs(fh.ip6f_offlg) & IP6F_OFF_MASK) != 0) |
if ((fh.ip6f_offlg & IP6F_OFF_MASK) != 0) |
return -1; |
return -1; |
if (nxtp) |
if (nxtp) |
*nxtp = fh.ip6f_nxt; |
*nxtp = fh.ip6f_nxt; |
Line 1511 ip6_sysctl(name, namelen, oldp, oldlenp, |
|
Line 1517 ip6_sysctl(name, namelen, oldp, oldlenp, |
|
} |
} |
return (error); |
return (error); |
#endif |
#endif |
case IPV6CTL_MAXFRAGS: |
|
return sysctl_int(oldp, oldlenp, newp, newlen, &ip6_maxfrags); |
|
default: |
default: |
return EOPNOTSUPP; |
return EOPNOTSUPP; |
} |
} |