From owner-freebsd-net@FreeBSD.ORG Mon Jun 17 18:50:17 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8B92B6F for ; Mon, 17 Jun 2013 18:50:17 +0000 (UTC) (envelope-from freebsd@mackn.org) Received: from mail-hosting.netagogo.com (mail-hosting.netagogo.com [64.62.244.187]) by mx1.freebsd.org (Postfix) with ESMTP id 76E5B1902 for ; Mon, 17 Jun 2013 18:50:17 +0000 (UTC) Received: by mail-hosting.netagogo.com (Postfix, from userid 65534) id 21EF74E73; Mon, 17 Jun 2013 11:44:48 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail-hosting.netagogo.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=6.0 tests=ALL_TRUSTED,BAYES_05 autolearn=ham version=3.3.2 Received: from mail-hosting.netagogo.com (unknown [10.10.10.187]) by mail-hosting.netagogo.com (Postfix) with ESMTP id 8EC474E7D for ; Mon, 17 Jun 2013 11:44:46 -0700 (PDT) Received: from [10.111.0.21] (67-215-87-12.ip.opendns.com [67.215.87.12]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail-hosting.netagogo.com (Postfix) with ESMTPSA id 6D51D4E75 for ; Mon, 17 Jun 2013 11:44:46 -0700 (PDT) Message-ID: <51BF591D.1050301@mackn.org> Date: Mon, 17 Jun 2013 11:44:45 -0700 From: Mack Nagashima User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120615 Thunderbird/13.0.1 MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: Some routes no longer getting flagged with 'GATEWAY' in fbsd >=8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jun 2013 18:50:17 -0000 we're in the process of upgrading from fbsd 7 to 9 and noticed a change in behavior that might be problematic for us. We use quagga to establish bgp sessions with a router. We have it set to redistribute kernel routes. Zebra seems to drop anything that doesn't have the 'GATEWAY' flag set on a route. Prior to fbsd8 this wasn't a problem. Doing something like the following worked fine in fbsd7: ifconfig em0 inet 192.168.100.1/24 ifconfig lo0 inet 192.168.100.100/24 alias route add -nostatic 192.168.100.100/32 192.168.100.1 in fbsd7 this would yield a route with the flags according to RTM_GET. in fbsd8+ the same would yield a route with without the GATEWAY flag. However the RTM_ADD for the 'route add' comes in with on fbsd8+ so quagga does add if it's up before the route gets added but starting quagga after the route is added ignores it since it's missing the GATEWAY flag once in the routing table. (route delete also fails to propagate to quagga since the GATEWAY flag is missing) I assume this is all due to the networking overhaul in fbsd8 and perhaps it no longer flags any route who's gateway is bound to ANY interface on the box as a gateway. So the ultimate question is.. is there a way to get the legacy behavior and get them flagged with GATEWAY so zebra will see them or a better solution with the way networking now works... (i noticed that issuing a 'route change' of an existing route with the GATEWAY flag set seems to work as it doesn't drop the flag when the gateway changes under it...) Thanks in advance! -mackn