From 389a77c295562ce6c349a8977c0658064ef4f9e5 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 12 Feb 2019 16:04:00 +0300 Subject: ipoe: always ignore Gratoitous ARP --- accel-pppd/ctrl/ipoe/arp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'accel-pppd') diff --git a/accel-pppd/ctrl/ipoe/arp.c b/accel-pppd/ctrl/ipoe/arp.c index a630e981..0698bd1c 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; } -- cgit v1.2.3