]> git.ipfire.org Git - people/ms/network.git/commitdiff
route: Fail cleanly if the protocol cannot be detected
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Apr 2016 21:51:22 +0000 (21:51 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Apr 2016 21:51:22 +0000 (21:51 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.route

index 1870f9646672134ddc287c57774a9e6faccf34b5..1b097129e8dc072fb4b24b3081d967e318009010 100644 (file)
@@ -395,8 +395,11 @@ route_entry_add() {
                ipv4)
                        command="ip route add"
                        ;;
+               *)
+                       log ERROR "Could not detect protocol for ${network}"
+                       return ${EXIT_ERROR}
+                       ;;
        esac
-       assert isset command
 
        # Add type.
        list_append command "${type}"