From owner-freebsd-bugs Sat Jun 15 15:30:03 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA19706 for bugs-outgoing; Sat, 15 Jun 1996 15:30:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA19700; Sat, 15 Jun 1996 15:30:02 -0700 (PDT) Resent-Date: Sat, 15 Jun 1996 15:30:02 -0700 (PDT) Resent-Message-Id: <199606152230.PAA19700@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, dima@satty.npi.msu.su Received: from satty.npi.msu.su (root@satty.npi.msu.su [158.250.2.251]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id PAA19552 for ; Sat, 15 Jun 1996 15:22:00 -0700 (PDT) Received: (from dima@localhost) by satty.npi.msu.su (8.7.4/8.7.3) id CAA09195; Sun, 16 Jun 1996 02:21:53 +0400 (MSD) Message-Id: <199606152221.CAA09195@satty.npi.msu.su> Date: Sun, 16 Jun 1996 02:21:53 +0400 (MSD) From: Dmitry Khrustalev Reply-To: dima@satty.npi.msu.su To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/1325: system crash when running gated Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1325 >Category: kern >Synopsis: system crash when running gated >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jun 15 15:30:01 PDT 1996 >Last-Modified: >Originator: Dmitry Khrustalev >Organization: >Release: FreeBSD 2.2-CURRENT i386 >Environment: FreeBSD-current, ip_output.c rev 1.40, gated >Description: ip_output does not allocate route when IP_ROUTETOIF is set, system crash in arpresolve with rt0 = NULL. >How-To-Repeat: run gated. >Fix: *** ip_output.c.orig Sun Jun 16 02:10:21 1996 --- ip_output.c Sun Jun 16 02:13:47 1996 *************** *** 144,149 **** --- 144,165 ---- dst->sin_addr = ip->ip_dst; } /* + * If this is the case, we probably don't want to allocate + * a protocol-cloned route since we didn't get one from the + * ULP. This lets TCP do its thing, while not burdening + * forwarding or ICMP with the overhead of cloning a route. + * Of course, we still want to do any cloning requested by + * the link layer, as this is probably required in all cases + * for correct operation (as it is for ARP). + */ + if (ro->ro_rt == 0) + rtalloc_ign(ro, RTF_PRCLONING); + if (ro->ro_rt == 0) { + ipstat.ips_noroute++; + error = EHOSTUNREACH; + goto bad; + } + /* * If routing to interface only, * short circuit routing lookup. */ *************** *** 160,181 **** ip->ip_ttl = 1; isbroadcast = in_broadcast(dst->sin_addr, ifp); } else { - /* - * If this is the case, we probably don't want to allocate - * a protocol-cloned route since we didn't get one from the - * ULP. This lets TCP do its thing, while not burdening - * forwarding or ICMP with the overhead of cloning a route. - * Of course, we still want to do any cloning requested by - * the link layer, as this is probably required in all cases - * for correct operation (as it is for ARP). - */ - if (ro->ro_rt == 0) - rtalloc_ign(ro, RTF_PRCLONING); - if (ro->ro_rt == 0) { - ipstat.ips_noroute++; - error = EHOSTUNREACH; - goto bad; - } ia = ifatoia(ro->ro_rt->rt_ifa); ifp = ro->ro_rt->rt_ifp; ro->ro_rt->rt_use++; --- 176,181 ---- >Audit-Trail: >Unformatted: