diff options
author | Kozlov Dmitry <dima@server> | 2011-08-23 18:02:22 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-08-23 18:02:22 +0400 |
commit | 9bc3fa4216fb2ad043232584b5a5e134e64830ed (patch) | |
tree | 910b5a0809a272d8525ff1ed2c1265b7f7d53c3d /accel-pppd/extra/net-snmp | |
parent | e281cbf20eb2e8f36ef5037e138fdf3798f1897d (diff) | |
download | accel-ppp-9bc3fa4216fb2ad043232584b5a5e134e64830ed.tar.gz accel-ppp-9bc3fa4216fb2ad043232584b5a5e134e64830ed.zip |
ppp: ipv6: multiple prefixes, route option, rdnss option implementation
Diffstat (limited to 'accel-pppd/extra/net-snmp')
-rw-r--r-- | accel-pppd/extra/net-snmp/sessionTable_data_access.c | 3 | ||||
-rw-r--r-- | accel-pppd/extra/net-snmp/terminate.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_access.c b/accel-pppd/extra/net-snmp/sessionTable_data_access.c index 847197af..0d38e5df 100644 --- a/accel-pppd/extra/net-snmp/sessionTable_data_access.c +++ b/accel-pppd/extra/net-snmp/sessionTable_data_access.c @@ -16,6 +16,7 @@ #include "sessionTable_data_access.h" #include "ppp.h" +#include "ipdb.h" /** @ingroup interface * @addtogroup data_access data_access: Routines to access data @@ -227,7 +228,7 @@ sessionTable_container_load(netsnmp_container *container) else ppp->username = strdup(""); - rowreq_ctx->data->peer_addr = ppp->peer_ipaddr; + rowreq_ctx->data->peer_addr = ppp->ipv4 ? ppp->ipv4->peer_addr : 0; rowreq_ctx->data->type = ppp->ctrl->type; rowreq_ctx->data->state = ppp->state; rowreq_ctx->data->uptime = (ppp->stop_time ? ppp->stop_time : t) - ppp->start_time; diff --git a/accel-pppd/extra/net-snmp/terminate.c b/accel-pppd/extra/net-snmp/terminate.c index bd385772..abe92df0 100644 --- a/accel-pppd/extra/net-snmp/terminate.c +++ b/accel-pppd/extra/net-snmp/terminate.c @@ -12,6 +12,7 @@ #include "triton.h" #include "ppp.h" +#include "ipdb.h" #include "terminate.h" @@ -65,7 +66,7 @@ static void terminate_by_ip(const char *val, size_t len) pthread_rwlock_rdlock(&ppp_lock); list_for_each_entry(ppp, &ppp_list, entry) { - if (ppp->peer_ipaddr != addr) + if (!ppp->ipv4 || ppp->ipv4->peer_addr != addr) continue; triton_context_call(ppp->ctrl->ctx, (triton_event_func)__terminate, ppp); break; |