1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

When matching an incoming ARP against a bridge, ensure both interfaces belong

to the same bridge.

Submitted by:	Alexander Zagrebin
This commit is contained in:
Andrew Thompson 2011-01-25 17:15:23 +00:00
parent 69319a626c
commit 965615476e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217829

View File

@ -564,7 +564,7 @@ in_arpinput(struct mbuf *m)
*/
IN_IFADDR_RLOCK();
LIST_FOREACH(ia, INADDR_HASH(itaddr.s_addr), ia_hash) {
if (((bridged && ia->ia_ifp->if_bridge != NULL) ||
if (((bridged && ia->ia_ifp->if_bridge == ifp->if_bridge) ||
ia->ia_ifp == ifp) &&
itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) {
ifa_ref(&ia->ia_ifa);
@ -581,7 +581,7 @@ in_arpinput(struct mbuf *m)
}
}
LIST_FOREACH(ia, INADDR_HASH(isaddr.s_addr), ia_hash)
if (((bridged && ia->ia_ifp->if_bridge != NULL) ||
if (((bridged && ia->ia_ifp->if_bridge == ifp->if_bridge) ||
ia->ia_ifp == ifp) &&
isaddr.s_addr == ia->ia_addr.sin_addr.s_addr) {
ifa_ref(&ia->ia_ifa);