handle static proto setup failure
authorFelix Fietkau <nbd@openwrt.org>
Fri, 9 Sep 2011 17:57:27 +0000 (19:57 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 9 Sep 2011 17:57:27 +0000 (19:57 +0200)
proto-static.c

index 3868ab7..3734f09 100644 (file)
@@ -205,10 +205,10 @@ static_handler(struct interface_proto_state *proto,
 
        switch (cmd) {
        case PROTO_CMD_SETUP:
 
        switch (cmd) {
        case PROTO_CMD_SETUP:
-               if (static_proto_setup(state))
-                       break;
+               if (!static_proto_setup(state))
+                       return -1;
 
 
-               /* fall through */
+               break;
        case PROTO_CMD_TEARDOWN:
                break;
        }
        case PROTO_CMD_TEARDOWN:
                break;
        }