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-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=23acfb335394f54586eda99299355dbd8c97fb17;p=people%2Fjschlag%2Fnetwork.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 --- diff --git a/src/functions/functions.route b/src/functions/functions.route index 640c871..4759684 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."