From e4bfe041eba9a46f5d3c048ab9143cfea2f64da9 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Tue, 29 Apr 2014 18:22:35 +0400 Subject: ipoe: limit only DHCPDISCOVER by connlimit Signed-off-by: Dmitry Kozlov --- accel-pppd/ctrl/ipoe/ipoe.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'accel-pppd/ctrl/ipoe') diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 5820065c..375e6c58 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); -- cgit v1.2.3