summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxebd <xeb@mail.ru>2023-12-27 13:44:30 +0300
committerGitHub <noreply@github.com>2023-12-27 13:44:30 +0300
commitb26eda1793b8e566053d53e5e212282763794231 (patch)
tree107be1a8658a7fad1a72bac775ecfbf52609cfc9
parent5e0c6f082bbe1e6b849553e8c0ad4bd1d17faca5 (diff)
parenteef5769ec1d3a7c2cdec5f515b4686e7076260c3 (diff)
downloadaccel-ppp-b26eda1793b8e566053d53e5e212282763794231.tar.gz
accel-ppp-b26eda1793b8e566053d53e5e212282763794231.zip
Merge pull request #118 from DmitriyEshenko/fix_local_net_check
ipoe: check localnet only for start=UP (unclassified packets) sessions
-rw-r--r--accel-pppd/ctrl/ipoe/arp.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/ipoe/arp.c b/accel-pppd/ctrl/ipoe/arp.c
index e94d61a0..e9b55ff4 100644
--- a/accel-pppd/ctrl/ipoe/arp.c
+++ b/accel-pppd/ctrl/ipoe/arp.c
@@ -92,7 +92,7 @@ static void arp_ctx_read(struct _arphdr *ah)
break;
}
- if (!ses1 && ipoe->opt_up) {
+ if (!ses1 && ipoe->opt_up && ipoe_check_localnet(ah->ar_spa)) {
ipoe_serv_recv_arp(ipoe, ah);
pthread_mutex_unlock(&ipoe->lock);
goto out;
@@ -191,9 +191,6 @@ static int arp_read(struct triton_md_handler_t *h)
if (ah->ar_spa == 0)
continue;
- if (!ipoe_check_localnet(ah->ar_spa))
- continue;
-
t = &arp_tree[src.sll_ifindex & HASH_BITS];
parent = NULL;