diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2019-02-12 16:04:00 +0300 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2019-02-12 16:04:00 +0300 |
commit | 389a77c295562ce6c349a8977c0658064ef4f9e5 (patch) | |
tree | 37fd32e890363dbf79e7d8a91c281335b80b92e0 /accel-pppd | |
parent | dbe051d2901b37c2f90662953915c83712a4a60a (diff) | |
download | accel-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.c | 5 |
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; } |