From owner-freebsd-current Sat Dec 1 19:32:35 2001 Delivered-To: freebsd-current@freebsd.org Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by hub.freebsd.org (Postfix) with ESMTP id BC4DA37B405 for ; Sat, 1 Dec 2001 19:32:30 -0800 (PST) Received: from localhost (arr@localhost) by fledge.watson.org (8.11.6/8.11.5) with SMTP id fB23WG211408; Sat, 1 Dec 2001 22:32:16 -0500 (EST) (envelope-from arr@FreeBSD.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Sat, 1 Dec 2001 22:32:15 -0500 (EST) From: "Andrew R. Reiter" X-Sender: arr@fledge.watson.org To: Edwin Culp Cc: current@FreeBSD.org Subject: Re: Fatal trap 12 on kernel from sometime Nov. 30. In-Reply-To: <3C099C39.3040305@encontacto.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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