summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pppoe/pppoe.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-20 13:11:17 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-20 13:11:17 +0400
commit119f1fce905142fbb8a0cf651c47d3329304e655 (patch)
treee172fc1f56893fcd42af1423a214077e95c8d62d /accel-pppd/ctrl/pppoe/pppoe.c
parent8d3351d4cdfcaf45aa2c918b0f8920798be4dc04 (diff)
downloadaccel-ppp-119f1fce905142fbb8a0cf651c47d3329304e655.tar.gz
accel-ppp-119f1fce905142fbb8a0cf651c47d3329304e655.zip
pppoe: stop server if interface down detected
Diffstat (limited to 'accel-pppd/ctrl/pppoe/pppoe.c')
-rw-r--r--accel-pppd/ctrl/pppoe/pppoe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/pppoe/pppoe.c b/accel-pppd/ctrl/pppoe/pppoe.c
index c1cbdb7b..5037f5a0 100644
--- a/accel-pppd/ctrl/pppoe/pppoe.c
+++ b/accel-pppd/ctrl/pppoe/pppoe.c
@@ -1146,6 +1146,10 @@ static int pppoe_serv_read(struct triton_md_handler_t *h)
if (n < 0) {
if (errno == EAGAIN)
break;
+ if (errno == ENETDOWN) {
+ _server_stop(serv);
+ return 1;
+ }
log_error("pppoe: read: %s\n", strerror(errno));
return 0;
}