FreeBSD Bugzilla – Attachment 219032 Details for
Bug 250552
[net] [fib] dangling route table entry after destroying interface
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Draft patch to fix 12 STABLE
draft_patch.diff (text/plain), 906 bytes, created by
Zhenlei Huang
on 2020-10-24 10:47:31 UTC
(
hide
)
Description:
Draft patch to fix 12 STABLE
Filename:
MIME Type:
Creator:
Zhenlei Huang
Created:
2020-10-24 10:47:31 UTC
Size:
906 bytes
patch
obsolete
>diff --git a/sys/net/if.c b/sys/net/if.c >index da55e4b64c7..f564f48fed5 100644 >--- a/sys/net/if.c >+++ b/sys/net/if.c >@@ -1908,6 +1908,7 @@ ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, > struct sockaddr *ia) > { > int error; >+ int fibnum; > struct rt_addrinfo info; > struct sockaddr_dl null_sdl; > struct ifnet *ifp; >@@ -1922,6 +1923,16 @@ ifa_maintain_loopback_route(int cmd, const char *otype, struct ifaddr *ifa, > info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; > link_init_sdl(ifp, (struct sockaddr *)&null_sdl, ifp->if_type); > >+ // XXX: prevent dangling loopback route in other fibs >+ if (cmd == RTM_DELETE) { >+ for (fibnum = 0; fibnum < rt_numfibs; fibnum++) { >+ if (fibnum == ifp->if_fib) >+ continue; >+ >+ (void) rtrequest1_fib(cmd, &info, NULL, fibnum); >+ } >+ } >+ > error = rtrequest1_fib(cmd, &info, NULL, ifp->if_fib); > > if (error == 0 ||
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 250552
: 219032