]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/pppoe/plugin.c
pppoe: Check if PPPoE discovery socket was created
[ppp.git] / pppd / plugins / pppoe / plugin.c
index f705b5facd7392fcc940b89b31c2ee7bb3e9ed3d..de9b8166ce7bb1e982aaaacdf5f1049c3d225471 100644 (file)
@@ -213,6 +213,10 @@ PPPOEConnectDevice(void)
     } else {
        conn->discoverySocket =
             openInterface(conn->ifName, Eth_PPPOE_Discovery, conn->myEth);
+       if (conn->discoverySocket < 0) {
+           error("Failed to create PPPoE discovery socket: %m");
+           goto errout;
+       }
        discovery(conn);
        if (conn->discoveryState != STATE_SESSION) {
            error("Unable to complete PPPoE Discovery");