FreeBSD Bugzilla – Attachment 206809 Details for
Bug 225792
ECMP is broken since tryforward()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ip_tryforward_rout_mpath
ip_tryforward_route_mpath.diff (text/plain), 1.66 KB, created by
Kubilay Kocak
on 2019-08-23 03:51:40 UTC
(
hide
)
Description:
ip_tryforward_rout_mpath
Filename:
MIME Type:
Creator:
Kubilay Kocak
Created:
2019-08-23 03:51:40 UTC
Size:
1.66 KB
patch
obsolete
>diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c >index ea59c10..0a50f62 100644 >--- a/sys/netinet/ip_fastfwd.c >+++ b/sys/netinet/ip_fastfwd.c >@@ -108,7 +108,8 @@ __FBSDID("$FreeBSD$"); > #include <machine/in_cksum.h> > > static struct sockaddr_in * >-ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) >+ip_findroute(struct route *ro, struct ip *ip, struct in_addr dest, >+ struct mbuf *m) > { > struct sockaddr_in *dst; > struct rtentry *rt; >@@ -121,7 +122,14 @@ ip_findroute(struct route *ro, struct in_addr dest, struct mbuf *m) > dst->sin_family = AF_INET; > dst->sin_len = sizeof(*dst); > dst->sin_addr.s_addr = dest.s_addr; >- in_rtalloc_ign(ro, 0, M_GETFIB(m)); >+#ifdef RADIX_MPATH >+ rtalloc_mpath_fib(&ro, >+ ntohl(ip->ip_src.s_addr ^ ip->ip_dst.s_addr), >+ M_GETFIB(m)); >+#else >+ in_rtalloc_ign(&ro, 0, M_GETFIB(m)); >+#endif >+ > > /* > * Route there and interface still up? >@@ -305,7 +313,7 @@ passin: > /* > * Find route to destination. > */ >- if ((dst = ip_findroute(&ro, dest, m)) == NULL) >+ if ((dst = ip_findroute(&ro, ip, dest, m)) == NULL) > return NULL; /* icmp unreach already sent */ > ifp = ro.ro_rt->rt_ifp; > >@@ -366,7 +374,7 @@ forwardlocal: > m->m_flags &= ~M_IP_NEXTHOP; > } > RTFREE(ro.ro_rt); >- if ((dst = ip_findroute(&ro, dest, m)) == NULL) >+ if ((dst = ip_findroute(&ro, ip, dest, m)) == NULL) > return NULL; /* icmp unreach already sent */ > ifp = ro.ro_rt->rt_ifp; > } >
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 225792
: 206809 |
208751