gracefully exit if the cmdline is bogus
authorJohn Crispin <blogic@openwrt.org>
Wed, 27 Aug 2014 14:09:08 +0000 (16:09 +0200)
committerJohn Crispin <blogic@openwrt.org>
Wed, 27 Aug 2014 14:18:52 +0000 (16:18 +0200)
Signed-off-by: John Crispin <blogic@openwrt.org>
main.c

diff --git a/main.c b/main.c
index 383eb9c57fffeaaf7962b156beec806fbd3e137b..f559c199cea40fb7a888e81c748145abc6e60941 100644 (file)
--- a/main.c
+++ b/main.c
@@ -65,6 +65,8 @@ main(int argc, char **argv)
                case 'i':
                        interface_add(optarg);
                        break;
+               default:
+                       return -1;
                }
        }