| version 1.37.2.11, 2002/07/12 01:40:33 |
version 1.37.2.12, 2002/08/01 02:46:51 |
|
|
| IP6_EXTHDR_CHECK(m, 0, sizeof(struct ip6_hdr), /*nothing*/); |
IP6_EXTHDR_CHECK(m, 0, sizeof(struct ip6_hdr), /*nothing*/); |
| #endif |
#endif |
| |
|
| if (m->m_len < sizeof(struct ip6_hdr)) { |
/* |
| struct ifnet *inifp; |
* If the IPv6 header is not aligned, slurp it up into a new |
| inifp = m->m_pkthdr.rcvif; |
* mbuf with space for link headers, in the event we forward |
| |
* it. OTherwise, if it is aligned, make sure the entire base |
| |
* IPv6 header is in the first mbuf of the chain. |
| |
*/ |
| |
if (IP6_HDR_ALIGNED_P(mtod(m, caddr_t)) == 0) { |
| |
struct ifnet *inifp = m->m_pkthdr.rcvif; |
| |
if ((m = m_copyup(m, sizeof(struct ip6_hdr), |
| |
(max_linkhdr + 3) & ~3)) == NULL) { |
| |
/* XXXJRT new stat, please */ |
| |
ip6stat.ip6s_toosmall++; |
| |
in6_ifstat_inc(inifp, ifs6_in_hdrerr); |
| |
return; |
| |
} |
| |
} else if (__predict_false(m->m_len < sizeof(struct ip6_hdr))) { |
| |
struct ifnet *inifp = m->m_pkthdr.rcvif; |
| if ((m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) { |
if ((m = m_pullup(m, sizeof(struct ip6_hdr))) == NULL) { |
| ip6stat.ip6s_toosmall++; |
ip6stat.ip6s_toosmall++; |
| in6_ifstat_inc(inifp, ifs6_in_hdrerr); |
in6_ifstat_inc(inifp, ifs6_in_hdrerr); |
|
|
| return; |
return; |
| } |
} |
| #endif |
#endif |
| |
KASSERT(IP6_HDR_ALIGNED_P(hbh)); |
| nxt = hbh->ip6h_nxt; |
nxt = hbh->ip6h_nxt; |
| |
|
| /* |
/* |
| Line 789 ip6_hopopts_input(plenp, rtalertp, mp, o |
|
| Line 804 ip6_hopopts_input(plenp, rtalertp, mp, o |
|
| return -1; |
return -1; |
| } |
} |
| #endif |
#endif |
| |
KASSERT(IP6_HDR_ALIGNED_P(hbh)); |
| off += hbhlen; |
off += hbhlen; |
| hbhlen -= sizeof(struct ip6_hbh); |
hbhlen -= sizeof(struct ip6_hbh); |
| opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh); |
opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh); |
| Line 1150 ip6_savecontrol(in6p, mp, ip6, m) |
|
| Line 1166 ip6_savecontrol(in6p, mp, ip6, m) |
|
| return; |
return; |
| } |
} |
| #endif |
#endif |
| |
KASSERT(IP6_HDR_ALIGNED_P(ip6e)); |
| |
|
| switch (nxt) { |
switch (nxt) { |
| case IPPROTO_DSTOPTS: |
case IPPROTO_DSTOPTS: |