diff options
author | julian <julian@FreeBSD.org> | 2001-02-05 21:25:27 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2001-02-05 21:25:27 +0000 |
commit | b617346dc6037a927cad48573a8df4a7e377e8ab (patch) | |
tree | d1ebd4727a3b5ef1030cf1a8f3ac051bf738e29f /sys | |
parent | 7150d7a0085427e23de4d123ec08157b753163e9 (diff) | |
download | FreeBSD-src-b617346dc6037a927cad48573a8df4a7e377e8ab.zip FreeBSD-src-b617346dc6037a927cad48573a8df4a7e377e8ab.tar.gz |
Fix bad patch from a few days ago. It broke some bridging.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/if_ether.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 7044845..a9c54fd 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -523,24 +523,25 @@ in_arpinput(m) op = ntohs(ea->arp_op); (void)memcpy(&isaddr, ea->arp_spa, sizeof (isaddr)); (void)memcpy(&itaddr, ea->arp_tpa, sizeof (itaddr)); - TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) -#ifdef BRIDGE + TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { /* * For a bridge, we want to check the address irrespective * of the receive interface. (This will change slightly * when we have clusters of interfaces). */ - if (!do_bridge) { +#ifdef BRIDGE +#define BRIDGE_TEST (do_bridge) #else - { +#define BRIDGE_TEST (0) /* cc will optimise the test away */ #endif - if (ia->ia_ifp == &ac->ac_if) { - maybe_ia = ia; - if ((itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) || - (isaddr.s_addr == ia->ia_addr.sin_addr.s_addr)) - break; + if ((BRIDGE_TEST) || (ia->ia_ifp == &ac->ac_if)) { + maybe_ia = ia; + if ((itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) || + (isaddr.s_addr == ia->ia_addr.sin_addr.s_addr)) { + break; } } + } if (maybe_ia == 0) { m_freem(m); return; |