summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2019-02-12 16:04:00 +0300
committerDmitry Kozlov <xeb@mail.ru>2019-02-12 16:04:00 +0300
commit389a77c295562ce6c349a8977c0658064ef4f9e5 (patch)
tree37fd32e890363dbf79e7d8a91c281335b80b92e0 /accel-pppd
parentdbe051d2901b37c2f90662953915c83712a4a60a (diff)
downloadaccel-ppp-389a77c295562ce6c349a8977c0658064ef4f9e5.tar.gz
accel-ppp-389a77c295562ce6c349a8977c0658064ef4f9e5.zip
ipoe: always ignore Gratoitous ARP
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/ctrl/ipoe/arp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/arp.c b/accel-pppd/ctrl/ipoe/arp.c
index a630e98..0698bd1 100644
--- a/accel-pppd/ctrl/ipoe/arp.c
+++ b/accel-pppd/ctrl/ipoe/arp.c
@@ -53,6 +53,9 @@ static void arp_ctx_read(struct _arphdr *ah)
struct ipoe_serv *ipoe = container_of(triton_context_self(), typeof(*ipoe), ctx);
struct sockaddr_ll dst;
+ if (ah->ar_spa == ah->ar_tpa)
+ goto out;
+
memset(&dst, 0, sizeof(dst));
dst.sll_family = AF_PACKET;
dst.sll_ifindex = ipoe->ifindex;
@@ -101,7 +104,7 @@ static void arp_ctx_read(struct _arphdr *ah)
}
if (ses2) {
- if (ipoe->opt_arp == 1 || ses1 == ses2) {
+ if (ipoe->opt_arp == 1) {
pthread_mutex_unlock(&ipoe->lock);
goto out;
}