mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
if gateway is not specified use iface
This will allow for the route to be applied to drop the packets on that interface.
This commit is contained in:
parent
6169b52749
commit
439dc8dce6
@ -1070,8 +1070,8 @@ def build_routes(iface, **settings):
|
||||
log.debug("IPv4 routes:\n{0}".format(opts4))
|
||||
log.debug("IPv6 routes:\n{0}".format(opts6))
|
||||
|
||||
routecfg = template.render(routes=opts4)
|
||||
routecfg6 = template.render(routes=opts6)
|
||||
routecfg = template.render(routes=opts4, iface=iface)
|
||||
routecfg6 = template.render(routes=opts6, iface=iface)
|
||||
|
||||
if settings['test']:
|
||||
routes = _read_temp(routecfg)
|
||||
|
@ -5,5 +5,6 @@
|
||||
/{{route.netmask}}
|
||||
{%- endif -%}
|
||||
{%- if route.gateway %} via {{route.gateway}}
|
||||
{%- else %} dev {{iface}}
|
||||
{%- endif %}
|
||||
{% endfor -%}
|
||||
|
Loading…
Reference in New Issue
Block a user