FreeBSD Bugzilla – Attachment 140837 Details for
Bug 187549
Host and network routes for a new interface appear in the wrong FIB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.83 KB, created by
Alan Somers
on 2014-03-13 17:40:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2014-03-13 17:40:00 UTC
Size:
1.83 KB
patch
obsolete
>--- //SpectraBSD/stable/sbin/ifconfig/iffib.c 2012-06-29 17:23:35.000000000 -0600 >+++ //SpectraBSD/stable/sbin/ifconfig/iffib.c 2013-02-07 01:14:53.000000000 -0700 >@@ -76,6 +76,8 @@ > > strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); > ifr.ifr_fib = fib; >+ if (setfib(fib) != 0) >+ warn("setfib"); > if (ioctl(s, SIOCSIFFIB, (caddr_t)&ifr) < 0) > warn("ioctl (SIOCSIFFIB)"); > } >--- //SpectraBSD/stable/sys/net/if.c 2012-08-29 22:35:04.000000000 -0600 >+++ //SpectraBSD/stable/sys/net/if.c 2013-02-07 01:14:53.000000000 -0700 >@@ -1464,7 +1464,7 @@ > info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; > info.rti_info[RTAX_DST] = ia; > info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; >- error = rtrequest1_fib(RTM_ADD, &info, &rt, 0); >+ error = rtrequest1_fib(RTM_ADD, &info, &rt, ifa->ifa_ifp->if_fib); > > if (error == 0 && rt != NULL) { > RT_LOCK(rt); >@@ -1496,7 +1496,7 @@ > info.rti_flags = ifa->ifa_flags | RTF_HOST | RTF_STATIC; > info.rti_info[RTAX_DST] = ia; > info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; >- error = rtrequest1_fib(RTM_DELETE, &info, NULL, 0); >+ error = rtrequest1_fib(RTM_DELETE, &info, NULL, ifa->ifa_ifp->if_fib); > > if (error != 0) > log(LOG_INFO, "ifa_del_loopback_route: deletion failed\n"); >--- //SpectraBSD/stable/sys/netinet/in.c 2013-01-31 22:00:58.000000000 -0700 >+++ //SpectraBSD/stable/sys/netinet/in.c 2013-02-07 01:14:53.000000000 -0700 >@@ -1101,10 +1101,12 @@ > (target->ia_flags & IFA_RTSELF)) { > struct route ia_ro; > int freeit = 0; >+ int fib; > > bzero(&ia_ro, sizeof(ia_ro)); > *((struct sockaddr_in *)(&ia_ro.ro_dst)) = target->ia_addr; >- rtalloc_ign_fib(&ia_ro, 0, 0); >+ fib = target->ia_ifa.ifa_ifp->if_fib; >+ rtalloc_ign_fib(&ia_ro, 0, fib); > if ((ia_ro.ro_rt != NULL) && (ia_ro.ro_rt->rt_ifp != NULL) && > (ia_ro.ro_rt->rt_ifp == V_loif)) { > RT_LOCK(ia_ro.ro_rt);
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 187549
: 140837 |
140838