From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 1 18:40:14 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3C78016A4B3 for ; Wed, 1 Oct 2003 18:40:14 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0510C43FCB for ; Wed, 1 Oct 2003 18:40:13 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h921eCFY068174 for ; Wed, 1 Oct 2003 18:40:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h921eC7G068173; Wed, 1 Oct 2003 18:40:12 -0700 (PDT) (envelope-from gnats) Resent-Date: Wed, 1 Oct 2003 18:40:12 -0700 (PDT) Resent-Message-Id: <200310020140.h921eC7G068173@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Richard Perini Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D736416A4BF for ; Wed, 1 Oct 2003 18:31:58 -0700 (PDT) Received: from mippet.ci.com.au (mippet.ci.com.au [192.65.182.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AF0C43FE3 for ; Wed, 1 Oct 2003 18:31:55 -0700 (PDT) (envelope-from rpp@ci.com.au) Received: from mippet.ci.com.au (rpp@localhost [127.0.0.1]) h921VmGx021622; Thu, 2 Oct 2003 11:31:49 +1000 (EST) Received: (from rpp@localhost) by mippet.ci.com.au (8.12.10/8.12.10/Submit) id h921Vm9Y021621; Thu, 2 Oct 2003 11:31:48 +1000 (EST) Message-Id: <200310020131.h921Vm9Y021621@mippet.ci.com.au> Date: Thu, 2 Oct 2003 11:31:48 +1000 (EST) From: Richard Perini To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: rpp@mippet.ci.com.au Subject: bin/57484: routed not ignoring cloned routes X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Richard Perini List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Oct 2003 01:40:14 -0000 >Number: 57484 >Category: bin >Synopsis: routed not ignoring cloned routes >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 01 18:40:10 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Richard Perini >Release: CURRENT, 4-STABLE >Organization: Corinthian Engineering P/L Sydney >Environment: System: FreeBSD mippet.ci.com.au 4.7-STABLE FreeBSD 4.7-STABLE #2: Sun Feb 2 11:36:09 EST 2003 rpp@mippet.ci.com.au:/u1/usr-obj/usr/src/sys/LOCAL i386 >Description: Routed clobbers all cloned host routes in the kernel's routing table. Symptoms are: higher than normal cpu time used by routed, some network functionality relying on presence of cloned host routes fails, cloned routes absent from netstat -ra after starting routed. First noticed when FreeBSD host running routed failed to respond to a router's ICMP "Must_fragment" packet relating to a GRE tunnel having a smaller MTU size than the default 1500 mtu. >How-To-Repeat: >Fix: The following patch applied to FreeBSD 4-STABLE source fixes the problem. Similar code exists in zebra and routed for recent BSDI and NetBSD found on www.rhyolite.com, which appears to be a reference site for BSD routed(?). --- /usr/src/sbin/routed/table.c Tue Sep 30 13:12:32 2003 +++ /u1/users/rpp/src/routed/table.c Thu Oct 2 10:42:09 2003 @@ -1116,6 +1116,13 @@ if (rtm->rtm_flags & RTF_LLINFO) continue; + /* ignore cloned routes + */ +#if defined(__FreeBSD__) && defined(RTF_WASCLONED) + if (rtm->rtm_flags & RTF_WASCLONED) + continue; +#endif + /* ignore multicast addresses */ if (IN_MULTICAST(ntohl(S_ADDR(INFO_DST(&info))))) @@ -1261,6 +1268,13 @@ trace_act("ignore ARP %s", str); continue; } + +#if defined(__FreeBSD__) && defined(RTF_WASCLONED) + if (m.r.rtm.rtm_flags & RTF_WASCLONED){ + trace_act("ignore cloned route %s", str); + continue; + } +#endif if (get_info_gate(&INFO_GATE(&info), &gate_sin)) { gate = S_ADDR(INFO_GATE(&info)); >Release-Note: >Audit-Trail: >Unformatted: