summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp
diff options
context:
space:
mode:
authorKozlov Dmitry <xeb@mail.ru>2012-09-05 23:24:51 +0400
committerKozlov Dmitry <xeb@mail.ru>2012-09-05 23:24:51 +0400
commit490f6384f6a54e388587329c0309a6602d5544e8 (patch)
tree5e70a9e4e7a8f6714a4694826ec68f293d1e55a8 /accel-pppd/ppp
parenta10ec0f4636cd559209659304709924daad96340 (diff)
downloadaccel-ppp-490f6384f6a54e388587329c0309a6602d5544e8.tar.gz
accel-ppp-490f6384f6a54e388587329c0309a6602d5544e8.zip
generalize interface statistics gathering
Diffstat (limited to 'accel-pppd/ppp')
-rw-r--r--accel-pppd/ppp/ppp_lcp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/accel-pppd/ppp/ppp_lcp.c b/accel-pppd/ppp/ppp_lcp.c
index 1b47cad5..2d1e195d 100644
--- a/accel-pppd/ppp/ppp_lcp.c
+++ b/accel-pppd/ppp/ppp_lcp.c
@@ -12,7 +12,7 @@
#include "ppp.h"
#include "ppp_lcp.h"
#include "events.h"
-#include "iplink.h"
+#include "iputils.h"
#include "memdebug.h"
@@ -656,15 +656,15 @@ static void send_echo_request(struct triton_timer_t *t)
++lcp->echo_sent;
+ ap_session_read_stats(&lcp->ppp->ses, &stats);
+
if (conf_echo_timeout) {
if (lcp->echo_sent == 2) {
- if (iplink_get_stats(lcp->ppp->ses.ifindex, &stats) == 0)
- lcp->last_ipackets = stats.rx_packets;
-
+ lcp->last_ipackets = stats.rx_packets;
time(&lcp->last_echo_ts);
} else if (lcp->echo_sent > 2) {
time(&ts);
- if (iplink_get_stats(lcp->ppp->ses.ifindex, &stats) == 0 && lcp->last_ipackets != stats.rx_packets) {
+ if (lcp->last_ipackets != stats.rx_packets) {
lcp->echo_sent = 1;
lcp_update_echo_timer(lcp);
} else if (ts - lcp->last_echo_ts > conf_echo_timeout) {