babeld: Error handling and tweaks for babeld commands.
diff --git a/babeld/babeld.c b/babeld/babeld.c
index 33b5d9e..da07434 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -608,6 +608,7 @@
         /* Notice to user we couldn't create Babel. */
         if (ret < 0) {
             zlog_warn ("can't create Babel");
+            return CMD_WARNING;
         }
     }
 
@@ -666,9 +667,11 @@
        "Set the protocol port (default is defined in RFC).\n"
        "IPv6 address")
 {
-    int port = atoi(argv[0]);
-    protocol_port = port;
+    int port;
 
+    VTY_GET_INTEGER_RANGE("port", port, argv[0], 1, 0xFFFF);
+
+    protocol_port = port;
     return CMD_SUCCESS;
 }