Module Name: src Committed By: kardel Date: Thu Jan 16 13:16:59 UTC 2020
Modified Files: src/sys/net: if_ethersubr.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.280 -r1.281 src/sys/net/if_ethersubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/if_ethersubr.c diff -u src/sys/net/if_ethersubr.c:1.280 src/sys/net/if_ethersubr.c:1.281 --- src/sys/net/if_ethersubr.c:1.280 Wed Oct 16 18:29:49 2019 +++ src/sys/net/if_ethersubr.c Thu Jan 16 13:16:59 2020 @@ -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, } 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, 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;