From owner-freebsd-net@FreeBSD.ORG Tue Jul 20 07:18:03 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF90A16A4CE; Tue, 20 Jul 2004 07:18:03 +0000 (GMT) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1141943D5A; Tue, 20 Jul 2004 07:18:03 +0000 (GMT) (envelope-from glebius@freebsd.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.12.11/8.12.8) with ESMTP id i6K7HxG7054696 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jul 2004 11:18:00 +0400 (MSD) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.12.11/8.12.11/Submit) id i6K7Hxgm054695; Tue, 20 Jul 2004 11:17:59 +0400 (MSD) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Tue, 20 Jul 2004 11:17:59 +0400 From: Gleb Smirnoff To: James Message-ID: <20040720071759.GA54281@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , James , Andre Oppermann , freebsd-net@freebsd.org References: <20040720021237.GA74977@scylla.towardex.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20040720021237.GA74977@scylla.towardex.com> User-Agent: Mutt/1.5.6i cc: freebsd-net@freebsd.org cc: Andre Oppermann Subject: Re: IPFW2 versrcreach update X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2004 07:18:04 -0000 On Mon, Jul 19, 2004 at 10:12:38PM -0400, James wrote: J> /* if no ifp provided, check if rtentry is not default route */ J> if (ifp == NULL && J> satosin(rt_key(ro.ro_rt))->sin_addr.s_addr == INADDR_ANY) { J> RTFREE(ro.ro_rt); J> return 0; J> } J> J> + /* by this point a route is found. check if this is pointed J> + * to blackhole/reject */ J> + if (ifp == NULL && ro.ro_rt->rt_flags & (RTF_REJECT|RTF_BLACKHOLE) ) { J> + RTFREE(ro.ro_rt); J> + return 0; J> + } J> J> J> Haven't tested this yet, but will do tomorrow after I finish some other stuff J> I need done before rebooting w/ a test kernel. J> Anyway the idea is to fail the check if the route has RTF_REJECT or J> RTF_BLACKHOLE flag, under loose-check (ifp set to NULL) operation, which is J> an easy straight forward change. Seems reasonable from my viewpoint. P.S. GNU zebra null-routes into lo0, always setting RTF_BLACKHOLE flag. What software uses RTF_REJECT flag? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE