]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/plugins/pppoe/pppoe-discovery.c
pppoe-discovery: Add check that there is no additional extra argument
[ppp.git] / pppd / plugins / pppoe / pppoe-discovery.c
index 4ac51063fc295967e15dc1fa6015710d8613418f..e93d7812709afa847573caa795d5cbf96fe0e266 100644 (file)
@@ -251,6 +251,12 @@ int main(int argc, char *argv[])
        }
     }
 
+    if (optind != argc) {
+       fprintf(stderr, "%s: extra argument '%s'\n", argv[0], argv[optind]);
+       usage();
+       exit(EXIT_FAILURE);
+    }
+
     if (!conn->ifName) {
        fprintf(stderr, "Interface was not specified\n");
        exit(EXIT_FAILURE);