summaryrefslogtreecommitdiff
path: root/accel-pppd
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-04-29 18:22:35 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-04-29 18:22:35 +0400
commite4bfe041eba9a46f5d3c048ab9143cfea2f64da9 (patch)
treedab65e8b56f18dfece4ec6622c00ee8cc005a805 /accel-pppd
parent1aa69ca5f6c9e1eeae6a1375516ef25624812728 (diff)
downloadaccel-ppp-e4bfe041eba9a46f5d3c048ab9143cfea2f64da9.tar.gz
accel-ppp-e4bfe041eba9a46f5d3c048ab9143cfea2f64da9.zip
ipoe: limit only DHCPDISCOVER by connlimit
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Diffstat (limited to 'accel-pppd')
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 5820065..375e6c5 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -1108,9 +1108,6 @@ static void ipoe_ses_recv_dhcpv4(struct dhcpv4_serv *dhcpv4, struct dhcpv4_packe
if (ap_shutdown)
return;
- if (connlimit_loaded && connlimit_check(cl_key_from_mac(pack->hdr->chaddr)))
- return;
-
if (conf_verbose) {
log_ppp_info2("recv ");
dhcpv4_print_packet(pack, 0, log_info2);
@@ -1280,7 +1277,7 @@ static void __ipoe_recv_dhcpv4(struct dhcpv4_serv *dhcpv4, struct dhcpv4_packet
if (ap_shutdown)
return;
- if (connlimit_loaded && connlimit_check(cl_key_from_mac(pack->hdr->chaddr)))
+ if (connlimit_loaded && pack->msg_type == DHCPDISCOVER && connlimit_check(cl_key_from_mac(pack->hdr->chaddr)))
return;
pthread_mutex_lock(&serv->lock);