fix potential null pointer deref when packets are forged
[project/mdnsd.git] / main.c
diff --git a/main.c b/main.c
index 11eb42d..f559c19 100644 (file)
--- a/main.c
+++ b/main.c
@@ -25,7 +25,6 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/nameser.h>
-#include <asm/byteorder.h>
 
 #include <libubus.h>
 #include <libubox/uloop.h>
@@ -66,6 +65,8 @@ main(int argc, char **argv)
                case 'i':
                        interface_add(optarg);
                        break;
+               default:
+                       return -1;
                }
        }