summaryrefslogtreecommitdiffstats
path: root/sys/netinet/if_ether.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-03-13 11:23:22 +0000
committerglebius <glebius@FreeBSD.org>2005-03-13 11:23:22 +0000
commit7884851ca93f68c56b34f1898fc5ce1674fc75b8 (patch)
treef70c0ce25fba05181b2bb61e157b08cf64800dd8 /sys/netinet/if_ether.c
parent650ccf9997fe6309d51d8771751b80234eb6de6c (diff)
downloadFreeBSD-src-7884851ca93f68c56b34f1898fc5ce1674fc75b8.zip
FreeBSD-src-7884851ca93f68c56b34f1898fc5ce1674fc75b8.tar.gz
Embrace with #ifdef DEV_CARP carp-related code.
Diffstat (limited to 'sys/netinet/if_ether.c')
-rw-r--r--sys/netinet/if_ether.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c
index fff7cf8..56d411d 100644
--- a/sys/netinet/if_ether.c
+++ b/sys/netinet/if_ether.c
@@ -553,7 +553,9 @@ in_arpinput(m)
u_int8_t *enaddr = NULL;
int op, rif_len;
int req_len;
+#ifdef DEV_CARP
int carp_match = 0;
+#endif
req_len = arphdr_len2(ifp->if_addrlen, sizeof(struct in_addr));
if (m->m_len < req_len && (m = m_pullup(m, req_len)) == NULL) {
@@ -637,8 +639,11 @@ match:
la = arplookup(isaddr.s_addr, itaddr.s_addr == myaddr.s_addr, 0);
if (la && (rt = la->la_rt) && (sdl = SDL(rt->rt_gateway))) {
/* the following is not an error when doing bridging */
- if (!do_bridge && rt->rt_ifp != ifp &&
- !(ifp->if_type == IFT_CARP && carp_match)) {
+ if (!do_bridge && rt->rt_ifp != ifp
+#ifdef DEV_CARP
+ && (ifp->if_type != IFT_CARP || !carp_match)
+#endif
+ ) {
if (log_arp_wrong_iface)
log(LOG_ERR, "arp: %s is on %s but got reply from %*D on %s\n",
inet_ntoa(isaddr),
OpenPOWER on IntegriCloud