summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-20 13:18:48 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-20 13:18:48 +0400
commit62a3372e720615b25512b0a05b67e078532507ec (patch)
tree47bcde55baf34bd6316907d263bdd8f12e983736
parent119f1fce905142fbb8a0cf651c47d3329304e655 (diff)
parente61344e439bbbca5ba711cf7566fdf5bcf8a34cc (diff)
downloadaccel-ppp-62a3372e720615b25512b0a05b67e078532507ec.tar.gz
accel-ppp-62a3372e720615b25512b0a05b67e078532507ec.zip
Merge branch 'master' of ssh://git.code.sf.net/p/accel-ppp/code
-rw-r--r--accel-pppd/ctrl/ipoe/dhcpv4.c2
-rw-r--r--accel-pppd/ctrl/ipoe/ipoe.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/ipoe/dhcpv4.c b/accel-pppd/ctrl/ipoe/dhcpv4.c
index 21042b7..b34a239 100644
--- a/accel-pppd/ctrl/ipoe/dhcpv4.c
+++ b/accel-pppd/ctrl/ipoe/dhcpv4.c
@@ -890,6 +890,8 @@ struct dhcpv4_relay *dhcpv4_relay_create(const char *_addr, in_addr_t giaddr, st
r->hnd.fd = sock;
r->hnd.read = dhcpv4_relay_read;
+ r->ctx.before_switch = log_switch;
+
triton_context_register(&r->ctx, NULL);
triton_md_register_handler(&r->ctx, &r->hnd);
triton_md_enable_handler(&r->hnd, MD_MODE_READ);
diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c
index 2a49b83..483ea7f 100644
--- a/accel-pppd/ctrl/ipoe/ipoe.c
+++ b/accel-pppd/ctrl/ipoe/ipoe.c
@@ -2302,6 +2302,7 @@ static void add_interface(const char *ifname, int ifindex, const char *opt, int
serv = _malloc(sizeof(*serv));
memset(serv, 0, sizeof(*serv));
serv->ctx.close = ipoe_serv_close;
+ serv->ctx.before_switch = log_switch;
pthread_mutex_init(&serv->lock, NULL);
serv->ifname = _strdup(ifname);
serv->ifindex = ifindex;
@@ -3078,7 +3079,7 @@ static void ipoe_init(void)
disc_item_pool = mempool_create(sizeof(struct disc_item));
req_item_pool = mempool_create(sizeof(struct request_item));
uc_pool = mempool_create(sizeof(struct unit_cache));
-
+
triton_context_register(&l4_redirect_ctx, NULL);
triton_context_wakeup(&l4_redirect_ctx);