ports/108430: [patch] RIP is broken in quagga

Eugene Grosbein eugen at grosbein.pp.ru
Sat Jan 27 15:10:18 UTC 2007


>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 at 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:



More information about the freebsd-ports-bugs mailing list