From 7ef879d12f2d2b0424d3d35cd96b604cb70e312c Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 20 Mar 2023 20:15:59 +0000 Subject: [PATCH] Use correct gateway for additional routes --- cookbooks/networking/templates/default/network.erb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cookbooks/networking/templates/default/network.erb b/cookbooks/networking/templates/default/network.erb index e937964f6..ea414bd37 100644 --- a/cookbooks/networking/templates/default/network.erb +++ b/cookbooks/networking/templates/default/network.erb @@ -33,8 +33,8 @@ Metric=<%= @interface[:metric] %> <% Hash(@interface.dig(:inet, :routes)).sort.each do |destination, details| -%> [Route] -<% if details[:gateway] -%> -Gateway=<%= details[:gateway] %> +<% if details[:via] -%> +Gateway=<%= details[:via] %> <% end -%> Destination=<%= destination %> <% if details[:metric] -%> @@ -47,8 +47,8 @@ Type=<%= details[:type] %> <% Hash(@interface.dig(:inet6, :routes)).sort.each do |destination, details| -%> [Route] -<% if details[:gateway] -%> -Gateway=<%= details[:gateway] %> +<% if details[:via] -%> +Gateway=<%= details[:via] %> <% end -%> Destination=<%= destination %> <% if details[:metric] -%> -- 2.39.5