version 1.7, 1999/08/07 12:33:04 |
version 1.8, 1999/10/01 10:15:16 |
|
|
ip6stat.ip6s_toomanyhdr++; |
ip6stat.ip6s_toomanyhdr++; |
goto bad; |
goto bad; |
} |
} |
|
|
|
/* |
|
* protection against faulty packet - there should be |
|
* more sanity checks in header chain processing. |
|
*/ |
|
if (m->m_pkthdr.len < off) { |
|
ip6stat.ip6s_tooshort++; |
|
goto bad; |
|
} |
|
|
nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt); |
nxt = (*inet6sw[ip6_protox[nxt]].pr_input)(&m, &off, nxt); |
} |
} |
return; |
return; |
Line 587 ip6_process_hopopts(m, opthead, hbhlen, |
|
Line 597 ip6_process_hopopts(m, opthead, hbhlen, |
|
optlen = *(opt + 1) + 2; |
optlen = *(opt + 1) + 2; |
break; |
break; |
case IP6OPT_RTALERT: |
case IP6OPT_RTALERT: |
|
/* XXX may need check for alignment */ |
if (hbhlen < IP6OPT_RTALERT_LEN) { |
if (hbhlen < IP6OPT_RTALERT_LEN) { |
ip6stat.ip6s_toosmall++; |
ip6stat.ip6s_toosmall++; |
goto bad; |
goto bad; |
Line 600 ip6_process_hopopts(m, opthead, hbhlen, |
|
Line 611 ip6_process_hopopts(m, opthead, hbhlen, |
|
*rtalertp = ntohs(rtalert_val); |
*rtalertp = ntohs(rtalert_val); |
break; |
break; |
case IP6OPT_JUMBO: |
case IP6OPT_JUMBO: |
|
/* XXX may need check for alignment */ |
if (hbhlen < IP6OPT_JUMBO_LEN) { |
if (hbhlen < IP6OPT_JUMBO_LEN) { |
ip6stat.ip6s_toosmall++; |
ip6stat.ip6s_toosmall++; |
goto bad; |
goto bad; |
Line 615 ip6_process_hopopts(m, opthead, hbhlen, |
|
Line 627 ip6_process_hopopts(m, opthead, hbhlen, |
|
* We can simply cast because of the alignment |
* We can simply cast because of the alignment |
* requirement of the jumbo payload option. |
* requirement of the jumbo payload option. |
*/ |
*/ |
|
#if 0 |
*plenp = ntohl(*(u_int32_t *)(opt + 2)); |
*plenp = ntohl(*(u_int32_t *)(opt + 2)); |
|
#else |
|
bcopy(opt + 2, plenp, sizeof(*plenp)); |
|
*plenp = htonl(*plenp); |
|
#endif |
if (*plenp <= IPV6_MAXPACKET) { |
if (*plenp <= IPV6_MAXPACKET) { |
/* |
/* |
* jumbo payload length must be larger |
* jumbo payload length must be larger |