Properly setup arguments for if_resolvemulti() callback.
Sponsored by: Mellanox Technologies MFC after: 1 week
This commit is contained in:
parent
61a292a396
commit
53219aa88a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298400
@ -310,13 +310,19 @@ static int addr_resolve(struct sockaddr *src_in,
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user