From 23acfb335394f54586eda99299355dbd8c97fb17 Mon Sep 17 00:00:00 2001 From: Jonatan Schlag Date: Tue, 30 May 2017 10:35:44 +0200 Subject: [PATCH] route: Check if the dection of the protocol failed If the check of the protocol failed we should break. Signed-off-by: Jonatan Schlag --- src/functions/functions.route | 3 +++ 1 file changed, 3 insertions(+) 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." -- 2.47.3