Date: Sat, 24 Feb 2018 11:13:45 +0700 From: Eugene Grosbein <eugen@grosbein.net> To: Andreas Longwitz <longwitz@incore.de>, freebsd-net@freebsd.org Subject: Re: loopback routes pinned by commit r326012 for FreeBSD 10 cannot be deleted Message-ID: <5A90E679.3030106@grosbein.net> In-Reply-To: <5A9075CB.10408@incore.de> References: <5A9075CB.10408@incore.de>
next in thread | previous in thread | raw e-mail | index | archive | help
24.02.2018 3:12, Andreas Longwitz wrote: > 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 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5A90E679.3030106>