The following reply was made to PR kernel/6554; it has been noted by GNATS.
From: Miod Vallat <[email protected]> To: [email protected] Cc: [email protected] Subject: Re: kernel/6554: IPSEC + GRE + carp crash and lockup Date: Tue, 22 Feb 2011 17:43:15 +0000 Does the following diff help? Index: if_gre.c =================================================================== RCS file: /cvs/src/sys/net/if_gre.c,v retrieving revision 1.52 diff -u -p -r1.52 if_gre.c --- if_gre.c 23 Sep 2010 11:34:50 -0000 1.52 +++ if_gre.c 22 Feb 2011 17:41:54 -0000 @@ -415,6 +415,15 @@ gre_output(struct ifnet *ifp, struct mbu goto end; } + if (m->m_len < sizeof(struct greip)) { + m = m_pullup(m, sizeof(struct ip)); + if (m == NULL) { + IF_DROP(&ifp->if_snd); + error = ENOBUFS; + goto end; + } + } + gh = mtod(m, struct greip *); if (sc->g_proto == IPPROTO_GRE) { /* We don't support any GRE flags for now */
