531-pppoe_no_disconnect_warning.patch 631 B

1234567891011121314
  1. --- a/pppd/plugins/rp-pppoe/plugin.c
  2. +++ b/pppd/plugins/rp-pppoe/plugin.c
  3. @@ -271,9 +271,8 @@ PPPOEDisconnectDevice(void)
  4. sp.sa_addr.pppoe.sid = 0;
  5. memcpy(sp.sa_addr.pppoe.dev, conn->ifName, IFNAMSIZ);
  6. memcpy(sp.sa_addr.pppoe.remote, conn->peerEth, ETH_ALEN);
  7. - if (connect(conn->sessionSocket, (struct sockaddr *) &sp,
  8. - sizeof(struct sockaddr_pppox)) < 0)
  9. - error("Failed to disconnect PPPoE socket: %d %m", errno);
  10. + connect(conn->sessionSocket, (struct sockaddr *) &sp,
  11. + sizeof(struct sockaddr_pppox));
  12. close(conn->sessionSocket);
  13. sendPADT(conn, NULL);
  14. if (conn->discoverySocket >= 0)