Fix for loopback detection in address resolve logic in ibcore.
When a loopback address is detected use the network interface which has the loopback flag set to trigger loopback logic in address resolve. MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
f736cb92cf
commit
02825401aa
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=336384
@ -349,6 +349,10 @@ static int addr4_resolve(struct sockaddr_in *src_in,
|
||||
error = EHOSTUNREACH;
|
||||
goto error_put_ifp;
|
||||
}
|
||||
/* get destination network interface from route */
|
||||
dev_put(ifp);
|
||||
ifp = rte->rt_ifp;
|
||||
dev_hold(ifp);
|
||||
} else if (ifp != rte->rt_ifp) {
|
||||
/*
|
||||
* Source and destination interfaces are
|
||||
@ -544,6 +548,10 @@ static int addr6_resolve(struct sockaddr_in6 *src_in,
|
||||
error = EHOSTUNREACH;
|
||||
goto error_put_ifp;
|
||||
}
|
||||
/* get destination network interface from route */
|
||||
dev_put(ifp);
|
||||
ifp = rte->rt_ifp;
|
||||
dev_hold(ifp);
|
||||
} else if (ifp != rte->rt_ifp) {
|
||||
/*
|
||||
* Source and destination interfaces are
|
||||
|
Loading…
Reference in New Issue
Block a user