use the CARP interface for arp/nd instead of the carp parent interface.
this provides the correct source mac address for the packets. there are routers out there that cache the source mac during nd and then subsequently bypass/miss packet filters on carp interfaces as they send to the parent interface mac instead of the correct carp interface mac.
This commit is contained in:
parent
e04dbf8f07
commit
12b9b4e230
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ethersubr.c,v 1.280 2019/10/16 18:29:49 christos Exp $ */
|
||||
/* $NetBSD: if_ethersubr.c,v 1.281 2020/01/16 13:16:59 kardel Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@ -61,7 +61,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.280 2019/10/16 18:29:49 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.281 2020/01/16 13:16:59 kardel Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_inet.h"
|
||||
@ -243,7 +243,7 @@ ether_output(struct ifnet * const ifp0, struct mbuf * const m0,
|
||||
} else if (m->m_flags & M_MCAST) {
|
||||
ETHER_MAP_IP_MULTICAST(&satocsin(dst)->sin_addr, edst);
|
||||
} else {
|
||||
error = arpresolve(ifp, rt, m, dst, edst, sizeof(edst));
|
||||
error = arpresolve(ifp0, rt, m, dst, edst, sizeof(edst));
|
||||
if (error)
|
||||
return (error == EWOULDBLOCK) ? 0 : error;
|
||||
}
|
||||
@ -292,7 +292,7 @@ ether_output(struct ifnet * const ifp0, struct mbuf * const m0,
|
||||
ETHER_MAP_IPV6_MULTICAST(&satocsin6(dst)->sin6_addr,
|
||||
edst);
|
||||
} else {
|
||||
error = nd6_resolve(ifp, rt, m, dst, edst,
|
||||
error = nd6_resolve(ifp0, rt, m, dst, edst,
|
||||
sizeof(edst));
|
||||
if (error)
|
||||
return (error == EWOULDBLOCK) ? 0 : error;
|
||||
|
Loading…
Reference in New Issue
Block a user