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 383eb9c..f559c19 100644 (file)
--- a/main.c
+++ b/main.c
@@ -65,6 +65,8 @@ main(int argc, char **argv)
                case 'i':
                        interface_add(optarg);
                        break;
                case 'i':
                        interface_add(optarg);
                        break;
+               default:
+                       return -1;
                }
        }
 
                }
        }