Date: Sun, 16 Jun 1996 02:21:53 +0400 (MSD) From: Dmitry Khrustalev <dima@satty.npi.msu.su> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/1325: system crash when running gated Message-ID: <199606152221.CAA09195@satty.npi.msu.su> Resent-Message-ID: <199606152230.PAA19700@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606152221.CAA09195>