From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jan 27 15:10:18 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4285E16A4C5 for ; Sat, 27 Jan 2007 15:10:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 1FF4713C4D0 for ; Sat, 27 Jan 2007 15:10:18 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l0RFAHJn043056 for ; Sat, 27 Jan 2007 15:10:17 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l0RFAHMo043055; Sat, 27 Jan 2007 15:10:17 GMT (envelope-from gnats) Resent-Date: Sat, 27 Jan 2007 15:10:17 GMT Resent-Message-Id: <200701271510.l0RFAHMo043055@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eugene Grosbein Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4487216A405 for ; Sat, 27 Jan 2007 15:08:09 +0000 (UTC) (envelope-from eugen@www.svzserv.kemerovo.su) Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80]) by mx1.freebsd.org (Postfix) with ESMTP id 001FB13C4B7 for ; Sat, 27 Jan 2007 15:08:05 +0000 (UTC) (envelope-from eugen@www.svzserv.kemerovo.su) Received: from www.svzserv.kemerovo.su (smmsp@localhost [127.0.0.1]) by www.svzserv.kemerovo.su (8.13.8/8.13.8) with ESMTP id l0RESN4A038948 for ; Sat, 27 Jan 2007 21:28:23 +0700 (KRAT) (envelope-from eugen@www.svzserv.kemerovo.su) Received: (from root@localhost) by www.svzserv.kemerovo.su (8.13.8/8.13.8/Submit) id l0RESN4h038947; Sat, 27 Jan 2007 21:28:23 +0700 (KRAT) (envelope-from eugen) Message-Id: <200701271428.l0RESN4h038947@www.svzserv.kemerovo.su> Date: Sat, 27 Jan 2007 21:28:23 +0700 (KRAT) From: Eugene Grosbein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/108430: [patch] RIP is broken in quagga X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Jan 2007 15:10:18 -0000 >Number: 108430 >Category: ports >Synopsis: [patch] RIP is broken in quagga >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 27 15:10:17 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 4.11-STABLE i386 >Organization: Svyaz Service JSC >Environment: System: FreeBSD www.svzserv.kemerovo.su 4.11-STABLE FreeBSD 4.11-STABLE #20: Mon Nov 27 13:23:00 KRAT 2006 eu@www.svzserv.kemerovo.su:/home4/obj/home/src/sys/WWW i386 >Description: Quagga, since version 0.99.3, takes metric value from RTM_NEWADDR message received from routing socket and this value overrides right interface metric learned by quagga at startup time. FreeBSD always returns zero value here (even if one have used 'ifconfig if0 metric N' and quagga does not sanitize it. Then quagga passes zero interface metric to ripd that uses it as hop count increment value (if one does not use 'offset-list in' for interface) thus breaking RIP. >How-To-Repeat: Run quagga/ripd, make ripd obtain a route from network and see that it does not increase its metric when advertizes the route later. Versions 0.99.2 (and earlier) do not behave so. >Fix: This patch adds needed sanity check. 'If' statemend added is always false for all versions of FreeBSD but may become true one day if RTM_NEWADDR would return interface metric set with ifconfig(1). --- zebra/kernel_socket.c.orig Fri Jan 26 10:55:03 2007 +++ zebra/kernel_socket.c Fri Jan 26 10:55:35 2007 @@ -585,6 +585,7 @@ if (ifnlen && strncmp (ifp->name, ifname, INTERFACE_NAMSIZ)) isalias = 1; + if (ifam->ifam_metric) ifp->metric = ifam->ifam_metric; /* Add connected address. */ Eugene Grosbein >Release-Note: >Audit-Trail: >Unformatted: