From owner-freebsd-net@freebsd.org Sat Feb 24 12:37:56 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28949F0ADAA for ; Sat, 24 Feb 2018 12:37:56 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from dss.incore.de (dss.incore.de [195.145.1.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B65F580064 for ; Sat, 24 Feb 2018 12:37:55 +0000 (UTC) (envelope-from longwitz@incore.de) Received: from inetmail.dmz (inetmail.dmz [10.3.0.3]) by dss.incore.de (Postfix) with ESMTP id F193B2D9; Sat, 24 Feb 2018 13:37:53 +0100 (CET) X-Virus-Scanned: amavisd-new at incore.de Received: from dss.incore.de ([10.3.0.3]) by inetmail.dmz (inetmail.dmz [10.3.0.3]) (amavisd-new, port 10024) with LMTP id suyR9LjJP4YZ; Sat, 24 Feb 2018 13:37:53 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id 11D4F1D2; Sat, 24 Feb 2018 13:37:53 +0100 (CET) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.local.incore (Postfix) with ESMTP id D51C9508A1; Sat, 24 Feb 2018 13:37:52 +0100 (CET) Message-ID: <5A915C9D.7020000@incore.de> Date: Sat, 24 Feb 2018 13:37:49 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: Eugene Grosbein CC: freebsd-net@freebsd.org Subject: Re: loopback routes pinned by commit r326012 for FreeBSD 10 cannot be deleted References: <5A9075CB.10408@incore.de> <5A90E679.3030106@grosbein.net> In-Reply-To: <5A90E679.3030106@grosbein.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Feb 2018 12:37:56 -0000 > Please test the follwoind patch for the kernel: > > --- sys/net/if.c.orig 2018-02-24 08:00:34.578670000 +0700 > +++ sys/net/if.c 2018-02-24 11:07:57.014318000 +0700 > @@ -1699,7 +1699,7 @@ ifa_del_loopback_route(struct ifaddr *if > null_sdl.sdl_type = ifa->ifa_ifp->if_type; > null_sdl.sdl_index = ifa->ifa_ifp->if_index; > bzero(&info, sizeof(info)); > - info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; > + info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC | RTF_PINNED; > info.rti_info[RTAX_DST] = ia; > info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; > error = rtrequest1_fib(RTM_DELETE, &info, NULL, ifa->ifa_ifp->if_fib); > This patch patch solves the problem for "ifconfig fxp0 delete": now the kernel removes the loopback route, tested on FreeBSD 10 r328260. But deleting the loopback route manually does not work anymore, is this intended behaviour ? I would like to control the routing table as much as possible. Andreas Longwitz