diff options
author | glebius <glebius@FreeBSD.org> | 2012-10-23 10:30:09 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-10-23 10:30:09 +0000 |
commit | 285432154c16cc537d0a1a34ba3212303c010fe8 (patch) | |
tree | ac0fd9657ea88c08eb85df523fd82d908e90f893 /sys/netinet | |
parent | e4588fbb85bd0666ca8a968aaa2ec629cec2991f (diff) | |
download | FreeBSD-src-285432154c16cc537d0a1a34ba3212303c010fe8.zip FreeBSD-src-285432154c16cc537d0a1a34ba3212303c010fe8.tar.gz |
Use ip_stripoptions() instead of handrolled version.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_icmp.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index eb9c1ad..d6fd5ba 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -857,19 +857,7 @@ match: printf("%d\n", opts->m_len); #endif } - /* - * Now strip out original options by copying rest of first - * mbuf's data back, and adjust the IP length. - */ - ip->ip_len = htons(ntohs(ip->ip_len) - optlen); - ip->ip_v = IPVERSION; - ip->ip_hl = 5; - m->m_len -= optlen; - if (m->m_flags & M_PKTHDR) - m->m_pkthdr.len -= optlen; - optlen += sizeof(struct ip); - bcopy((caddr_t)ip + optlen, (caddr_t)(ip + 1), - (unsigned)(m->m_len - sizeof(struct ip))); + ip_stripoptions(m); } m_tag_delete_nonpersistent(m); m->m_flags &= ~(M_BCAST|M_MCAST); |