From cd2c14f998c57bbe6a01dc5854f2763c0d7f31fb Mon Sep 17 00:00:00 2001 From: Simon Farnsworth Date: Sun, 1 Mar 2015 11:53:58 +0000 Subject: [PATCH] Send PADT on PPPoE disconnect Once we've terminated the PPP session, there is no chance of a PPP layer disconnect. Some PPPoE relays don't detect the PPP session going down, and depend on a long timeout or a PPPoE PADT to terminate the session. Send a PADT on disconnect to work around these buggy relays. Signed-off-by: Simon Farnsworth --- pppd/plugins/rp-pppoe/plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c index a8c2bb4..90fb808 100644 --- a/pppd/plugins/rp-pppoe/plugin.c +++ b/pppd/plugins/rp-pppoe/plugin.c @@ -273,9 +273,10 @@ PPPOEDisconnectDevice(void) sizeof(struct sockaddr_pppox)) < 0) error("Failed to disconnect PPPoE socket: %d %m", errno); close(conn->sessionSocket); - /* don't send PADT?? */ - if (conn->discoverySocket >= 0) + if (conn->discoverySocket >= 0) { + sendPADT(conn, NULL); close(conn->discoverySocket); + } } static void -- 2.39.2