diff options
author | jlemon <jlemon@FreeBSD.org> | 2001-10-25 06:14:21 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 2001-10-25 06:14:21 +0000 |
commit | 669cd5c6d78c0056da6450671a852cb7ef1a663e (patch) | |
tree | 43dabd7bc5d2d227a1e9d37a8836b377a0fc782e /sys | |
parent | 0ecfb417cf04f7a4497d6b4b0499fa4decf0ecaa (diff) | |
download | FreeBSD-src-669cd5c6d78c0056da6450671a852cb7ef1a663e.zip FreeBSD-src-669cd5c6d78c0056da6450671a852cb7ef1a663e.tar.gz |
If we are bridging, fall back to using any inet address in the system,
irrespective of receive interface, as a last resort.
Submitted by: ru
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/if_ether.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index ba6b352..b4f5f08 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -597,13 +597,18 @@ in_arpinput(m) * as a dummy address for the rest of the function. */ TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) - if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) - break; - if (ifa == NULL) { + if (ifa->ifa_addr && ifa->ifa_addr->sa_family == AF_INET) { + ia = ifatoia(ifa); + goto match; + } + /* + * If bridging, fall back to using any inet address. + */ + if (!BRIDGE_TEST || + (ia = TAILQ_FIRST(&in_ifaddrhead)) == NULL) { m_freem(m); return; } - ia = ifatoia(ifa); match: myaddr = ia->ia_addr.sin_addr; if (!bcmp(ar_sha(ah), IF_LLADDR(ifp), ifp->if_addrlen)) { |