diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2006-08-21 21:36:54 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2006-08-21 21:36:54 +0000 |
commit | 22d5fd5e677c2603663a7a19cb1f79ab1a76a600 (patch) | |
tree | 1840712654b92f94f186769cfa44c5e79785c8c2 /sys/netinet | |
parent | 274fe522d523c56b1c1bd6cf54d2c84fcc2f77d7 (diff) |
Answer ARP queries also for addresses on carp interfaces, if carps
physical interface shares a bridge with the interface that received it.
Patch based on a version from camield@
Fixes PR 5178.
OK mcbride@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/if_ether.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 585c3e02e9d..567f84a0d5d 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.64 2006/06/16 16:49:40 henning Exp $ */ +/* $OpenBSD: if_ether.c,v 1.65 2006/08/21 21:36:53 mpf Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -570,9 +570,19 @@ in_arpinput(m) * layer. Note we still prefer a perfect match, * but allow this weaker match if necessary. */ - if (m->m_pkthdr.rcvif->if_bridge != NULL && - m->m_pkthdr.rcvif->if_bridge == ia->ia_ifp->if_bridge) - bridge_ia = ia; + if (m->m_pkthdr.rcvif->if_bridge != NULL) { + if (m->m_pkthdr.rcvif->if_bridge == + ia->ia_ifp->if_bridge) + bridge_ia = ia; +#if NCARP > 0 + else if (ia->ia_ifp->if_carpdev != NULL && + m->m_pkthdr.rcvif->if_bridge == + ia->ia_ifp->if_carpdev->if_bridge && + carp_iamatch(ia, ea->arp_sha, + &count, index)) + bridge_ia = ia; +#endif + } #endif } |