From: Simon Farnsworth Date: Sun, 1 Mar 2015 11:49:06 +0000 Subject: [PATCH] Suppress false error message on PPPoE disconnect Once the kernel handles PPPoE PADTs correctly[1], a PADT triggered disconnect will result in EALREADY when pppd tries to clear the session ID. Simply ignore the error if, and only if, the error is EALREADY [1] https://patchwork.ozlabs.org/patch/444717/ Signed-off-by: Simon Farnsworth Imported from ppp_2.4.7-2+4.1.debian.tar.xz Signed-off-by: Michael Olbrich --- pppd/plugins/rp-pppoe/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c index a8c2bb4f4a6a..da50cdf2b9d3 100644 --- a/pppd/plugins/rp-pppoe/plugin.c +++ b/pppd/plugins/rp-pppoe/plugin.c @@ -270,7 +270,7 @@ PPPOEDisconnectDevice(void) memcpy(sp.sa_addr.pppoe.dev, conn->ifName, IFNAMSIZ); memcpy(sp.sa_addr.pppoe.remote, conn->peerEth, ETH_ALEN); if (connect(conn->sessionSocket, (struct sockaddr *) &sp, - sizeof(struct sockaddr_pppox)) < 0) + sizeof(struct sockaddr_pppox)) < 0 && errno != EALREADY) error("Failed to disconnect PPPoE socket: %d %m", errno); close(conn->sessionSocket); /* don't send PADT?? */