mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-05 03:39:02 +00:00
Bring in fix from NetBSD's revision 1.16:
Pass the correct destination address for the route-to-gateway case. PR: kern/10607 MFC after: 2 weeks
This commit is contained in:
parent
7cd8375d89
commit
a447a5ae06
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=78805
@ -109,6 +109,7 @@ ipflow_fastforward(
|
||||
struct ip *ip;
|
||||
struct ipflow *ipf;
|
||||
struct rtentry *rt;
|
||||
struct sockaddr *dst;
|
||||
int error;
|
||||
|
||||
/*
|
||||
@ -158,7 +159,12 @@ ipflow_fastforward(
|
||||
*/
|
||||
ipf->ipf_uses++;
|
||||
ipf->ipf_timer = IPFLOW_TIMER;
|
||||
if ((error = (*rt->rt_ifp->if_output)(rt->rt_ifp, m, &ipf->ipf_ro.ro_dst, rt)) != 0) {
|
||||
|
||||
if (rt->rt_flags & RTF_GATEWAY)
|
||||
dst = rt->rt_gateway;
|
||||
else
|
||||
dst = &ipf->ipf_ro.ro_dst;
|
||||
if ((error = (*rt->rt_ifp->if_output)(rt->rt_ifp, m, dst, rt)) != 0) {
|
||||
if (error == ENOBUFS)
|
||||
ipf->ipf_dropped++;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user