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
9498114d8c
commit
3d3da0ad3d
@ -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