From 4bbf4ecd14b853237e32c75edb57656008f037c1 Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Sat, 28 Mar 2009 17:03:42 +0000 Subject: [PATCH] Check that nameserver was found --- src/iodine.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/iodine.c b/src/iodine.c index a5ee9ca..dafd4a9 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -1104,7 +1104,12 @@ main(int argc, char **argv) /* NOTREACHED */ } - set_nameserver(nameserv_addr); + if (nameserv_addr) { + set_nameserver(nameserv_addr); + } else { + usage(); + /* NOTREACHED */ + } if(strlen(topdomain) <= 128) { if(check_topdomain(topdomain)) {