diff options
author | fenner <fenner@FreeBSD.org> | 1996-11-23 19:07:02 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1996-11-23 19:07:02 +0000 |
commit | 7e667698e7fe554d6c0f8b0141dbcf59574cc7ab (patch) | |
tree | 044c3ed7cafecd92cdc1343e13a08aa7df26eac3 /sys/netinet | |
parent | 70d1241afef8d22702caabfbd449c94a9a4f21c9 (diff) | |
download | FreeBSD-src-7e667698e7fe554d6c0f8b0141dbcf59574cc7ab.zip FreeBSD-src-7e667698e7fe554d6c0f8b0141dbcf59574cc7ab.tar.gz |
Allocate a header mbuf for the start of the encapsulated packet.
The rest of the code was treating it as a header mbuf, but it was
allocated as a normal mbuf.
This fixes the panic: ip_output no HDR when you have a multicast
tunnel configured.
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_mroute.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index ebc844b..bc5b3cc 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -9,7 +9,7 @@ * Modified by Bill Fenner, PARC, April 1995 * * MROUTING Revision: 3.5 - * $Id: ip_mroute.c,v 1.33 1996/07/12 04:11:48 bde Exp $ + * $Id: ip_mroute.c,v 1.34 1996/07/12 17:22:32 fenner Exp $ */ #include "opt_mrouting.h" @@ -1575,10 +1575,10 @@ encap_send(ip, vifp, m) * new mbuf so we can modify it. Try to fill the new * mbuf since if we don't the ethernet driver will. */ - MGET(mb_copy, M_DONTWAIT, MT_DATA); + MGETHDR(mb_copy, M_DONTWAIT, MT_HEADER); if (mb_copy == NULL) return; - mb_copy->m_data += 16; + mb_copy->m_data += max_linkhdr; mb_copy->m_len = sizeof(multicast_encap_iphdr); if ((mb_copy->m_next = m_copy(m, 0, M_COPYALL)) == NULL) { |