Author: glebius Date: Tue Oct 23 10:30:09 2012 New Revision: 241926 URL: http://svn.freebsd.org/changeset/base/241926
Log: Use ip_stripoptions() instead of handrolled version. Modified: head/sys/netinet/ip_icmp.c Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Tue Oct 23 10:29:31 2012 (r241925) +++ head/sys/netinet/ip_icmp.c Tue Oct 23 10:30:09 2012 (r241926) @@ -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); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"