From 59e81bc877624ef782c954fd8d43cf53c988e5ab Mon Sep 17 00:00:00 2001 From: Joao Vieira Date: Sun, 11 Sep 2016 00:49:28 +0100 Subject: [PATCH] Fixes routes being installed with wrong interfaces Routes that get installed for a given interface should only get executed when that interface is coming up/down and not when other interfaces are starting or stopping. This should fix #36208. --- salt/templates/debian_ip/route_eth.jinja | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/templates/debian_ip/route_eth.jinja b/salt/templates/debian_ip/route_eth.jinja index 19d0d3d9cb..73b9a27758 100644 --- a/salt/templates/debian_ip/route_eth.jinja +++ b/salt/templates/debian_ip/route_eth.jinja @@ -1,5 +1,6 @@ #!/bin/sh # {{route_type}} +test "${IFACE}" = "{{iface}}" || exit 0 {% for route in routes %}{% if route.name %}# {{route.name}} {%endif%}route {{route_type}} -net {% if route.ipaddr %}{{route.ipaddr}}{%endif%} {% if route.netmask %}netmask {{route.netmask}}{%endif%} {% if route.gateway %}gateway {{route.gateway}}{%endif%} dev {{iface}} {% endfor %}