From 791acb435ece77ce6f7d78f6ed1b2c9e0c866a9e Mon Sep 17 00:00:00 2001 From: "Sergey V. Lobanov" Date: Wed, 20 Oct 2021 20:06:19 +0300 Subject: [PATCH] T50: use server mac in arp replies for proxy_arp=2 proxy_arp=2 should be used for ipoe setup with shared vlan and intra-vlan l2 isolation. accel-ppp should use server mac when sending arp reply message. There is no reason to send subscriber's mac if proxy_arp is enabled In case of ipoe shared vlan without l2-isolation, proxy_arp=1 should be used --- accel-pppd/ctrl/ipoe/arp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/accel-pppd/ctrl/ipoe/arp.c b/accel-pppd/ctrl/ipoe/arp.c index fa6858d2..e94d61a0 100644 --- a/accel-pppd/ctrl/ipoe/arp.c +++ b/accel-pppd/ctrl/ipoe/arp.c @@ -109,13 +109,8 @@ static void arp_ctx_read(struct _arphdr *ah) pthread_mutex_unlock(&ipoe->lock); goto out; } - - if (ipoe->opt_arp == 2) - memcpy(ah2.ar_sha, ses2->hwaddr, ETH_ALEN); - else - memcpy(ah2.ar_sha, ipoe->hwaddr, ETH_ALEN); - } else - memcpy(ah2.ar_sha, ipoe->hwaddr, ETH_ALEN); + } + memcpy(ah2.ar_sha, ipoe->hwaddr, ETH_ALEN); pthread_mutex_unlock(&ipoe->lock);