From 756bf837f6ac8696241b708590478a07617ff9ed Mon Sep 17 00:00:00 2001 From: Lars Beckers <lars.beckers@rwth-aachen.de> Date: Tue, 23 Apr 2019 18:05:10 +0200 Subject: [PATCH] networkd: allow routes w/o gateway setting --- networkd/templates/20-wired-routed.network.j2 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/networkd/templates/20-wired-routed.network.j2 b/networkd/templates/20-wired-routed.network.j2 index 66437c2..7054162 100644 --- a/networkd/templates/20-wired-routed.network.j2 +++ b/networkd/templates/20-wired-routed.network.j2 @@ -19,7 +19,9 @@ IPForward=yes {% for route in network.routes|default([{'gateway': network.gateway}]) %} [Route] +{% if route.gateway is defined %} Gateway={{ route.gateway }} +{% endif %} {% if route.destination is defined %} Destination={{ route.destination }} {% endif %} -- GitLab