| version 1.78, 1999/01/19 21:58:40 |
version 1.79, 1999/01/19 23:03:21 |
|
|
| ipstat.ips_reassembled++; |
ipstat.ips_reassembled++; |
| ip = mtod(m, struct ip *); |
ip = mtod(m, struct ip *); |
| hlen = ip->ip_hl << 2; |
hlen = ip->ip_hl << 2; |
| |
ip->ip_len += hlen; |
| } else |
} else |
| if (fp) |
if (fp) |
| ip_freef(fp); |
ip_freef(fp); |
| IPQ_UNLOCK(); |
IPQ_UNLOCK(); |
| } else |
} |
| ip->ip_len -= hlen; |
|
| |
|
| /* |
/* |
| * Switch out to protocol's input routine. |
* Switch out to protocol's input routine. |
| Line 1021 ip_dooptions(m) |
|
| Line 1021 ip_dooptions(m) |
|
| } |
} |
| return (0); |
return (0); |
| bad: |
bad: |
| ip->ip_len -= ip->ip_hl << 2; /* XXX icmp_error adds in hdr length */ |
|
| icmp_error(m, type, code, 0, 0); |
icmp_error(m, type, code, 0, 0); |
| ipstat.ips_badoptions++; |
ipstat.ips_badoptions++; |
| return (1); |
return (1); |
| Line 1164 ip_stripoptions(m, mopt) |
|
| Line 1163 ip_stripoptions(m, mopt) |
|
| register caddr_t opts; |
register caddr_t opts; |
| int olen; |
int olen; |
| |
|
| olen = (ip->ip_hl<<2) - sizeof (struct ip); |
olen = (ip->ip_hl << 2) - sizeof (struct ip); |
| opts = (caddr_t)(ip + 1); |
opts = (caddr_t)(ip + 1); |
| i = m->m_len - (sizeof (struct ip) + olen); |
i = m->m_len - (sizeof (struct ip) + olen); |
| bcopy(opts + olen, opts, (unsigned)i); |
bcopy(opts + olen, opts, (unsigned)i); |
| m->m_len -= olen; |
m->m_len -= olen; |
| if (m->m_flags & M_PKTHDR) |
if (m->m_flags & M_PKTHDR) |
| m->m_pkthdr.len -= olen; |
m->m_pkthdr.len -= olen; |
| ip->ip_hl = sizeof(struct ip) >> 2; |
ip->ip_len -= olen; |
| |
ip->ip_hl = sizeof (struct ip) >> 2; |
| } |
} |
| |
|
| int inetctlerrmap[PRC_NCMDS] = { |
int inetctlerrmap[PRC_NCMDS] = { |