From: Jonatan Schlag Date: Tue, 30 May 2017 08:35:44 +0000 (+0200) Subject: route: Check if the dection of the protocol failed X-Git-Tag: 009~261 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b449504eb85e0bf7fb9f1da3b39cb7cb0d1719fc;p=network.git route: Check if the dection of the protocol failed If the check of the protocol failed we should break. Signed-off-by: Jonatan Schlag Signed-off-by: Michael Tremer --- diff --git a/src/functions/functions.route b/src/functions/functions.route index 640c8713..4759684c 100644 --- a/src/functions/functions.route +++ b/src/functions/functions.route @@ -97,7 +97,10 @@ route_add() { fi local network_proto=$(ip_detect_protocol ${network}) + assert isset network_proto + local gateway_proto=$(ip_detect_protocol ${gateway}) + assert isset gateway_proto if [ "${network_proto}" != "${gateway_proto}" ]; then error "The IP protocol version of the given network and gateway did not match."