diff options
author | alc <alc@FreeBSD.org> | 2005-01-23 19:43:46 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2005-01-23 19:43:46 +0000 |
commit | 4af1a370c8aa2ec76c48fd901aece75c01526f6e (patch) | |
tree | a7d6c86dc450b72503a47b7cc86b5d7fc1513863 /sys | |
parent | 29a34551e1903ccad7e0b01032d13e9e5eec84fe (diff) | |
download | FreeBSD-src-4af1a370c8aa2ec76c48fd901aece75c01526f6e.zip FreeBSD-src-4af1a370c8aa2ec76c48fd901aece75c01526f6e.tar.gz |
Correctly move the packet header in ip_insertoptions().
Reported by: Anupam Chanda
Reviewed by: sam@
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_output.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 2d8e88a..59b8aef 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1064,11 +1064,12 @@ ip_insertoptions(m, opt, phlen) *phlen = 0; return (m); } + M_MOVE_PKTHDR(n, m); n->m_pkthdr.rcvif = (struct ifnet *)0; #ifdef MAC mac_create_mbuf_from_mbuf(m, n); #endif - n->m_pkthdr.len = m->m_pkthdr.len + optlen; + n->m_pkthdr.len += optlen; m->m_len -= sizeof(struct ip); m->m_data += sizeof(struct ip); n->m_next = m; |