FreeBSD Bugzilla – Attachment 140839 Details for
Bug 187553
Source address selection for UDP packets with SO_DONTROUTE uses the default FIB
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.19 KB, created by
Alan Somers
on 2014-03-13 20:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Alan Somers
Created:
2014-03-13 20:10:01 UTC
Size:
2.19 KB
patch
obsolete
>--- //SpectraBSD/stable/sys/netinet/in_pcb.c 2013-07-19 20:54:44.000000000 -0600 >+++ //SpectraBSD/stable/sys/netinet/in_pcb.c 2013-08-27 15:52:29.000000000 -0600 >@@ -729,10 +729,10 @@ > struct ifnet *ifp; > > ia = ifatoia(ifa_ifwithdstaddr((struct sockaddr *)sin, >- RT_DEFAULT_FIB)); >+ curthread->td_proc->p_fibnum)); > if (ia == NULL) > ia = ifatoia(ifa_ifwithnet((struct sockaddr *)sin, 0, >- RT_DEFAULT_FIB)); >+ curthread->td_proc->p_fibnum)); > if (ia == NULL) { > error = ENETUNREACH; > goto done; >@@ -847,10 +847,11 @@ > sain.sin_len = sizeof(struct sockaddr_in); > sain.sin_addr.s_addr = faddr->s_addr; > >- ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain), RT_DEFAULT_FIB)); >+ ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain), >+ curthread->td_proc->p_fibnum)); > if (ia == NULL) > ia = ifatoia(ifa_ifwithnet(sintosa(&sain), 0, >- RT_DEFAULT_FIB)); >+ curthread->td_proc->p_fibnum)); > if (ia == NULL) > ia = ifatoia(ifa_ifwithaddr(sintosa(&sain))); > >--- //SpectraBSD/stable/sys/netinet/ip_output.c 2013-07-19 20:54:44.000000000 -0600 >+++ //SpectraBSD/stable/sys/netinet/ip_output.c 2013-08-27 15:52:29.000000000 -0600 >@@ -119,6 +119,7 @@ > struct ip *ip; > struct ifnet *ifp = NULL; /* keep compiler happy */ > struct mbuf *m0; >+ int fib; > int hlen = sizeof (struct ip); > int mtu; > int n; /* scratchpad */ >@@ -226,10 +227,11 @@ > * interface is specified by the broadcast address of an interface, > * or the destination address of a ptp interface. > */ >+ fib = curthread->td_proc->p_fibnum; > if (flags & IP_SENDONES) { > if ((ia = ifatoia(ifa_ifwithbroadaddr(sintosa(dst)))) == NULL && > (ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst), >- RT_DEFAULT_FIB))) == NULL) { >+ fib))) == NULL) { > IPSTAT_INC(ips_noroute); > error = ENETUNREACH; > goto bad; >@@ -241,9 +243,9 @@ > isbroadcast = 1; > } else if (flags & IP_ROUTETOIF) { > if ((ia = ifatoia(ifa_ifwithdstaddr(sintosa(dst), >- RT_DEFAULT_FIB))) == NULL && >+ fib))) == NULL && > (ia = ifatoia(ifa_ifwithnet(sintosa(dst), 0, >- RT_DEFAULT_FIB))) == NULL) { >+ fib))) == NULL) { > IPSTAT_INC(ips_noroute); > error = ENETUNREACH; > goto bad;
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 187553
: 140839