Fix for resolving mac address when the destination address is a gateway.
Remove some dead code while at it. Sponsored by: Mellanox Technologies MFC after: 1 week
This commit is contained in:
parent
fc65edc1cd
commit
4442b8fd7d
@ -333,17 +333,18 @@ static int addr_resolve(struct sockaddr *src_in,
|
||||
switch (dst_in->sa_family) {
|
||||
#ifdef INET
|
||||
case AF_INET:
|
||||
error = arpresolve(ifp, is_gw, NULL, dst_in, edst, NULL);
|
||||
error = arpresolve(ifp, is_gw, NULL,
|
||||
is_gw ? rte->rt_gateway : dst_in, edst, NULL);
|
||||
break;
|
||||
#endif
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
error = nd6_resolve(ifp, is_gw, NULL, dst_in, edst, NULL);
|
||||
error = nd6_resolve(ifp, is_gw, NULL,
|
||||
is_gw ? rte->rt_gateway : dst_in, edst, NULL);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
/* XXX: Shouldn't happen. */
|
||||
error = -EINVAL;
|
||||
break;
|
||||
}
|
||||
RTFREE(rte);
|
||||
if (error == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user