Use interface fib for proxyarp checks.
Before the change, proxyarp checks for src and dst addresses were performed using default fib, breaking multi-fib scenario. PR: 245181 Submitted by: Scott Aitken (original version) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D24244
This commit is contained in:
parent
5a596a5c60
commit
b1eecb3df7
@ -1044,7 +1044,11 @@ in_arpinput(struct mbuf *m)
|
|||||||
(void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);
|
(void)memcpy(ar_tha(ah), ar_sha(ah), ah->ar_hln);
|
||||||
(void)memcpy(ar_sha(ah), enaddr, ah->ar_hln);
|
(void)memcpy(ar_sha(ah), enaddr, ah->ar_hln);
|
||||||
} else {
|
} else {
|
||||||
struct llentry *lle = NULL;
|
/*
|
||||||
|
* Destination address is not ours. Check if
|
||||||
|
* proxyarp entry exists or proxyarp is turned on globally.
|
||||||
|
*/
|
||||||
|
struct llentry *lle;
|
||||||
|
|
||||||
sin.sin_addr = itaddr;
|
sin.sin_addr = itaddr;
|
||||||
lle = lla_lookup(LLTABLE(ifp), 0, (struct sockaddr *)&sin);
|
lle = lla_lookup(LLTABLE(ifp), 0, (struct sockaddr *)&sin);
|
||||||
@ -1061,8 +1065,8 @@ in_arpinput(struct mbuf *m)
|
|||||||
if (!V_arp_proxyall)
|
if (!V_arp_proxyall)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
/* XXX MRT use table 0 for arp reply */
|
if (fib4_lookup_nh_basic(ifp->if_fib, itaddr, 0, 0,
|
||||||
if (fib4_lookup_nh_basic(0, itaddr, 0, 0, &nh4) != 0)
|
&nh4) != 0)
|
||||||
goto drop;
|
goto drop;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1083,8 +1087,8 @@ in_arpinput(struct mbuf *m)
|
|||||||
* wrong network.
|
* wrong network.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* XXX MRT use table 0 for arp checks */
|
if (fib4_lookup_nh_basic(ifp->if_fib, isaddr, 0, 0,
|
||||||
if (fib4_lookup_nh_basic(0, isaddr, 0, 0, &nh4) != 0)
|
&nh4) != 0)
|
||||||
goto drop;
|
goto drop;
|
||||||
if (nh4.nh_ifp != ifp) {
|
if (nh4.nh_ifp != ifp) {
|
||||||
ARP_LOG(LOG_INFO, "proxy: ignoring request"
|
ARP_LOG(LOG_INFO, "proxy: ignoring request"
|
||||||
|
Loading…
Reference in New Issue
Block a user