Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Dec 2001 22:32:15 -0500 (EST)
From:      "Andrew R. Reiter" <arr@FreeBSD.org>
To:        Edwin Culp <eculp@encontacto.net>
Cc:        current@FreeBSD.org
Subject:   Re: Fatal trap 12 on kernel from sometime Nov. 30.
Message-ID:  <Pine.NEB.3.96L.1011201222934.11340A-100000@fledge.watson.org>
In-Reply-To: <3C099C39.3040305@encontacto.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Edwin,

The following is the current fix in place:

Index: ip_output.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_output.c,v
retrieving revision 1.142
retrieving revision 1.143
diff -u -r1.142 -r1.143
--- ip_output.c 4 Nov 2001 22:56:25 -0000       1.142
+++ ip_output.c 1 Dec 2001 13:48:16 -0000       1.143
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  *     @(#)ip_output.c 8.3 (Berkeley) 1/21/94
- * $FreeBSD: src/sys/netinet/ip_output.c,v 1.142 2001/11/04 22:56:25
luigi Exp
$
+ * $FreeBSD: src/sys/netinet/ip_output.c,v 1.143 2001/12/01 13:48:16 ru
Exp $
  */

 #define _IP_VHL
@@ -123,11 +123,11 @@
        struct mbuf *m = m0;
        int hlen = sizeof (struct ip);
        int len, off, error = 0;
+       struct route iproute;
        struct sockaddr_in *dst;
        struct in_ifaddr *ia;
        int isbroadcast, sw_csum;
 #ifdef IPSEC
-       struct route iproute;
        struct socket *so = NULL;
        struct secpolicy *sp = NULL;
 #endif
@@ -188,9 +188,6 @@
 #ifdef DIAGNOSTIC
        if ((m->m_flags & M_PKTHDR) == 0)
                panic("ip_output no HDR");
-       if (!ro)
-               panic("ip_output no route, proto = %d",
-                     mtod(m, struct ip *)->ip_p);
 #endif
        if (opt) {
                m = ip_insertoptions(m, opt, &len);
@@ -213,6 +210,11 @@
                hlen = IP_VHL_HL(ip->ip_vhl) << 2;
        }

+       /* Route packet. */
+       if (ro == NULL) {
+               ro = &iproute;
+               bzero(ro, sizeof(*ro));
+       }
        dst = (struct sockaddr_in *)&ro->ro_dst;
        /*
         * If there is a cached route,
Index: ip_mroute.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/ip_mroute.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- ip_mroute.c 29 Oct 2001 02:19:19 -0000      1.68
+++ ip_mroute.c 1 Dec 2001 13:48:16 -0000       1.69
@@ -9,7 +9,7 @@
  * Modified by Bill Fenner, PARC, April 1995
  *
  * MROUTING Revision: 3.5
- * $FreeBSD: src/sys/netinet/ip_mroute.c,v 1.68 2001/10/29 02:19:19
dillon Exp
$
+ * $FreeBSD: src/sys/netinet/ip_mroute.c,v 1.69 2001/12/01 13:48:16 ru
Exp $
  */

 #include "opt_mrouting.h"
@@ -1867,7 +1867,6 @@
 {
     struct ip_moptions imo;
     int error;
-    static struct route ro;
     int s = splnet();

     if (vifp->v_flags & VIFF_TUNNEL) {
@@ -1886,7 +1885,7 @@
         * should get rejected because they appear to come from
         * the loopback interface, thus preventing looping.
         */
-       error = ip_output(m, (struct mbuf *)0, &ro,
+       error = ip_output(m, (struct mbuf *)0, NULL,
                          IP_FORWARDING, &imo);

        if (mrtdebug & DEBUG_XMIT)



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1011201222934.11340A-100000>