[PATCH 06/16] 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 <simon@farnz.org.uk>

Gbp-Pq: Name 0006-Send-PADT-on-PPPoE-disconnect.patch
This commit is contained in:
Simon Farnsworth 2015-03-01 11:53:58 +00:00 committed by openKylinBot
parent e6417a616c
commit 12e34a8f31
1 changed files with 3 additions and 2 deletions

View File

@ -273,9 +273,10 @@ PPPOEDisconnectDevice(void)
sizeof(struct sockaddr_pppox)) < 0 && errno != EALREADY)
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