svn commit: r298400 - head/sys/ofed/drivers/infiniband/core
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Apr 21 11:32:23 UTC 2016
Author: hselasky
Date: Thu Apr 21 11:32:22 2016
New Revision: 298400
URL: https://svnweb.freebsd.org/changeset/base/298400
Log:
Properly setup arguments for if_resolvemulti() callback.
Sponsored by: Mellanox Technologies
MFC after: 1 week
Modified:
head/sys/ofed/drivers/infiniband/core/addr.c
Modified: head/sys/ofed/drivers/infiniband/core/addr.c
==============================================================================
--- head/sys/ofed/drivers/infiniband/core/addr.c Thu Apr 21 11:02:06 2016 (r298399)
+++ head/sys/ofed/drivers/infiniband/core/addr.c Thu Apr 21 11:32:22 2016 (r298400)
@@ -310,13 +310,19 @@ mcast:
return rdma_copy_addr(addr, ifp, ifp->if_broadcastaddr);
if (multi) {
struct sockaddr *llsa;
+ struct sockaddr_dl sdl;
+
+ sdl.sdl_len = sizeof(sdl);
+ llsa = (struct sockaddr *)&sdl;
+
+ if (ifp->if_resolvemulti == NULL)
+ return -EOPNOTSUPP;
error = ifp->if_resolvemulti(ifp, &llsa, dst_in);
if (error)
return -error;
error = rdma_copy_addr(addr, ifp,
LLADDR((struct sockaddr_dl *)llsa));
- free(llsa, M_IFMADDR);
if (error == 0)
memcpy(src_in, ifa->ifa_addr, ip_addr_size(ifa->ifa_addr));
return error;
More information about the svn-src-head
mailing list