diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-04-29 18:22:35 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-04-29 18:22:35 +0400 |
commit | e4bfe041eba9a46f5d3c048ab9143cfea2f64da9 (patch) | |
tree | dab65e8b56f18dfece4ec6622c00ee8cc005a805 /accel-pppd | |
parent | 1aa69ca5f6c9e1eeae6a1375516ef25624812728 (diff) | |
download | accel-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.c | 5 |
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); |