Fix bad patch from a few days ago. It broke some bridging.

This commit is contained in:
Julian Elischer 2001-02-05 21:25:27 +00:00
parent 0402c7ce1d
commit 41d2ba5e27

View File

@ -523,24 +523,25 @@ in_arpinput(m)
op = ntohs(ea->arp_op); op = ntohs(ea->arp_op);
(void)memcpy(&isaddr, ea->arp_spa, sizeof (isaddr)); (void)memcpy(&isaddr, ea->arp_spa, sizeof (isaddr));
(void)memcpy(&itaddr, ea->arp_tpa, sizeof (itaddr)); (void)memcpy(&itaddr, ea->arp_tpa, sizeof (itaddr));
TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) {
#ifdef BRIDGE
/* /*
* For a bridge, we want to check the address irrespective * For a bridge, we want to check the address irrespective
* of the receive interface. (This will change slightly * of the receive interface. (This will change slightly
* when we have clusters of interfaces). * when we have clusters of interfaces).
*/ */
if (!do_bridge) { #ifdef BRIDGE
#define BRIDGE_TEST (do_bridge)
#else #else
{ #define BRIDGE_TEST (0) /* cc will optimise the test away */
#endif #endif
if (ia->ia_ifp == &ac->ac_if) { if ((BRIDGE_TEST) || (ia->ia_ifp == &ac->ac_if)) {
maybe_ia = ia; maybe_ia = ia;
if ((itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) || if ((itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) ||
(isaddr.s_addr == ia->ia_addr.sin_addr.s_addr)) (isaddr.s_addr == ia->ia_addr.sin_addr.s_addr)) {
break; break;
} }
} }
}
if (maybe_ia == 0) { if (maybe_ia == 0) {
m_freem(m); m_freem(m);
return; return;