From owner-freebsd-net@FreeBSD.ORG Fri Jan 26 11:39:58 2007 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1EB0516A501 for ; Fri, 26 Jan 2007 11:39:58 +0000 (UTC) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (grgw.svzserv.kemerovo.su [213.184.64.166]) by mx1.freebsd.org (Postfix) with ESMTP id 8514E13C483 for ; Fri, 26 Jan 2007 11:39:56 +0000 (UTC) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (localhost [127.0.0.1]) by grosbein.pp.ru (8.13.8/8.13.8) with ESMTP id l0PIfkax060528 for ; Fri, 26 Jan 2007 01:41:46 +0700 (KRAT) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.13.8/8.13.8/Submit) id l0PIfknl060527 for net@freebsd.org; Fri, 26 Jan 2007 01:41:46 +0700 (KRAT) (envelope-from eugen) Date: Fri, 26 Jan 2007 01:41:46 +0700 From: Eugene Grosbein To: net@freebsd.org Message-ID: <20070125184146.GA60481@grosbein.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Cc: Subject: interface metric & quagga X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Jan 2007 11:39:58 -0000 Hi! 'route -n monitor' shows me that 'ifconfig up' command produces RTM_NEWADDR, RTM_ADD and RTM_IFINFO message. RTM_NEWADDR contains 'metric 0' regardless of interface metric value set with ifconfig before. quagga, since version 0.99.3, takes metric value from RTM_NEWADDR message and this value overrides right interface metric learned by quagga a milisecond before. Then it passes zero interface metric to ripd that uses interface metric as hop count increment for RIP-learned routes. This effectively breaks RIPv2 for FreeBSD (quagga-0.99.2 and older versions do not use metric from RTM_NEWADDR and work), perhaps RIPv1 too. Verified with RELENG_4 and RELENG_6. Is it kernel bug or quagga bug? I also suggest to include next patch to the Ports tree if no objections. It restores RIP support. --- zebra/kernel_socket.c.orig Fri Jan 26 01:10:06 2007 +++ zebra/kernel_socket.c Fri Jan 26 01:10:17 2007 @@ -585,8 +585,6 @@ if (ifnlen && strncmp (ifp->name, ifname, INTERFACE_NAMSIZ)) isalias = 1; - ifp->metric = ifam->ifam_metric; - /* Add connected address. */ switch (sockunion_family (&addr)) { Eugene Grosbein