diff options
author | Dmitry Kozlov <xeb@mail.ru> | 2014-10-20 13:11:17 +0400 |
---|---|---|
committer | Dmitry Kozlov <xeb@mail.ru> | 2014-10-20 13:11:17 +0400 |
commit | 119f1fce905142fbb8a0cf651c47d3329304e655 (patch) | |
tree | e172fc1f56893fcd42af1423a214077e95c8d62d | |
parent | 8d3351d4cdfcaf45aa2c918b0f8920798be4dc04 (diff) | |
download | accel-ppp-119f1fce905142fbb8a0cf651c47d3329304e655.tar.gz accel-ppp-119f1fce905142fbb8a0cf651c47d3329304e655.zip |
pppoe: stop server if interface down detected
-rw-r--r-- | accel-pppd/ctrl/pppoe/pppoe.c | 4 |
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; } |