diff options
Diffstat (limited to 'accel-pppd/ctrl/ipoe/ipoe.c')
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index fea61a8..2f9cf12 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -166,7 +166,7 @@ static void ipoe_session_start(struct ipoe_session *ses) if (ses->serv->opt_shared == 0) strncpy(ses->ses.ifname, ses->serv->ifname, AP_IFNAME_LEN); - else { + else if (ses->ifindex == -1) { ses->ifindex = ipoe_nl_create(0, 0, ses->dhcpv4_request ? ses->serv->ifname : NULL, ses->hwaddr); if (ses->ifindex == -1) { log_ppp_error("ipoe: failed to create interface\n"); @@ -455,6 +455,9 @@ static void ipoe_recv_dhcpv4(struct dhcpv4_serv *dhcpv4, struct dhcpv4_packet *p struct ipoe_session *ses; //struct dhcpv4_packet *reply; + if (ap_shutdown) + return; + pthread_mutex_lock(&serv->lock); if (pack->msg_type == DHCPDISCOVER) { ses = ipoe_session_lookup(serv, pack); @@ -546,6 +549,9 @@ static struct ipoe_session *ipoe_session_create_up(struct ipoe_serv *serv, struc { struct ipoe_session *ses; + if (ap_shutdown) + return NULL; + ses = mempool_alloc(ses_pool); if (!ses) { log_emerg("out of memery\n"); |