diff options
author | Kozlov Dmitry <xeb@mail.ru> | 2013-04-26 15:12:46 +0400 |
---|---|---|
committer | Kozlov Dmitry <xeb@mail.ru> | 2013-04-26 15:12:46 +0400 |
commit | 405e580905790f22f17f736e996a4cea3635d800 (patch) | |
tree | b009a3c33691c12e3b1acbbbf3053dde5feaf6f4 | |
parent | 5200f6647bd26c2c7fe52bcbcb8924dfb7ff3401 (diff) | |
download | accel-ppp-405e580905790f22f17f736e996a4cea3635d800.tar.gz accel-ppp-405e580905790f22f17f736e996a4cea3635d800.zip |
ipoe: fix dhcp release handling
-rw-r--r-- | accel-pppd/ctrl/ipoe/ipoe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index 9819521..64bc02a 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -766,7 +766,7 @@ static void ipoe_session_finished(struct ap_session *s) if (ses->dhcpv4) dhcpv4_free(ses->dhcpv4); - + triton_context_call(&ses->ctx, (triton_event_func)ipoe_session_free, ses); } @@ -904,7 +904,7 @@ static void ipoe_ses_recv_dhcpv4(struct dhcpv4_serv *dhcpv4, struct dhcpv4_packe if (ses->yiaddr) { if (ses->serv->dhcpv4_relay) { dhcpv4_packet_ref(pack); - triton_context_call(&ses->ctx, (triton_event_func)ipoe_session_keepalive, pack); + ipoe_session_keepalive(pack); } else dhcpv4_send_reply(DHCPOFFER, dhcpv4, pack, ses->yiaddr, ses->siaddr, ses->router, ses->mask, ses->lease_time, ses->dhcpv4_relay_reply); } @@ -919,14 +919,14 @@ static void ipoe_ses_recv_dhcpv4(struct dhcpv4_serv *dhcpv4, struct dhcpv4_packe else if (ses->serv->dhcpv4_relay) dhcpv4_relay_send(ses->serv->dhcpv4_relay, pack, 0, ses->serv->ifname, conf_agent_remote_id); - ap_session_terminate(&ses->ses, TERM_USER_REQUEST, 0); + triton_context_call(ses->ctrl.ctx, (triton_event_func)__ipoe_session_terminate, ses); } else { dhcpv4_packet_ref(pack); ipoe_session_keepalive(pack); } } else if (pack->msg_type == DHCPDECLINE || pack->msg_type == DHCPRELEASE) { dhcpv4_packet_ref(pack); - ipoe_session_decline(pack); + triton_context_call(ses->ctrl.ctx, (triton_event_func)ipoe_session_decline, pack); } } |