Author: hselasky Date: Tue Jul 17 09:30:32 2018 New Revision: 336384 URL: https://svnweb.freebsd.org/changeset/base/336384
Log: 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 Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c Modified: head/sys/ofed/drivers/infiniband/core/ib_addr.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:29:14 2018 (r336383) +++ head/sys/ofed/drivers/infiniband/core/ib_addr.c Tue Jul 17 09:30:32 2018 (r336384) @@ -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 _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"