From owner-freebsd-net@freebsd.org Fri Feb 23 20:20:03 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 3088BF1A483 for ; Fri, 23 Feb 2018 20:20:03 +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 BF7517671D for ; Fri, 23 Feb 2018 20:20:02 +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 AA2116E1 for ; Fri, 23 Feb 2018 21:13:00 +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 EGeOIRvLiiOK for ; Fri, 23 Feb 2018 21:12:59 +0100 (CET) Received: from mail.local.incore (fwintern.dmz [10.0.0.253]) by dss.incore.de (Postfix) with ESMTP id A21D7126 for ; Fri, 23 Feb 2018 21:12:59 +0100 (CET) Received: from bsdmhs.longwitz (unknown [192.168.99.6]) by mail.local.incore (Postfix) with ESMTP id 7251C508D1 for ; Fri, 23 Feb 2018 21:12:59 +0100 (CET) Message-ID: <5A9075CB.10408@incore.de> Date: Fri, 23 Feb 2018 21:12:59 +0100 From: Andreas Longwitz User-Agent: Thunderbird 2.0.0.19 (X11/20090113) MIME-Version: 1.0 To: freebsd-net@freebsd.org Subject: loopback routes pinned by commit r326012 for FreeBSD 10 cannot be deleted Content-Type: text/plain; charset=ISO-8859-15 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: Fri, 23 Feb 2018 20:20:03 -0000 When an IP address is being added to an interface, the kernel installs loopback route: After "ifconfig fxp0 inet 10.0.0.100 netmask 255.255.255.0" the command "netstat -rn" gives Internet: Destination Gateway Flags Refs Use Netif default 192.168.14.242 UGS 1 91639 msk0 10.0.0.0/24 link#8 U 0 6 fxp0 10.0.0.100 link#8 UHS 0 0 lo0 127.0.0.1 link#21 UH 0 6366 lo0 After "ifconfig fxp0 delete" in FreeBSD 10 before r326012 the kernel deletes the loopback route and output of "netstat -rn" gives Internet: Destination Gateway Flags Refs Use Netif default 192.168.14.242 UGS 1 91639 msk0 127.0.0.1 link#21 UH 0 6366 lo0 After r326012 we see Internet: Destination Gateway Flags Refs Use Netif default 192.168.14.242 UGS 1 91639 msk0 10.0.0.100 link#8 UHS 0 0 lo0 127.0.0.1 link#21 UH 0 6366 lo0 Also the loopback route can not be deleted manually: route delete 10.0.0.100 --> route: writing to routing socket: Address already in use delete host 10.0.0.100 fib 0: gateway uses the same route -- Andreas Longwitz