]> git.openstreetmap.org Git - chef.git/commitdiff
Use correct gateway for additional routes
authorTom Hughes <tom@compton.nu>
Mon, 20 Mar 2023 20:15:59 +0000 (20:15 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 20 Mar 2023 20:15:59 +0000 (20:15 +0000)
cookbooks/networking/templates/default/network.erb

index e937964f656b8bbae2b19193c29fb5909988be43..ea414bd37af14aca1a3f92108d16118688cbda5d 100644 (file)
@@ -33,8 +33,8 @@ Metric=<%= @interface[:metric] %>
 <% Hash(@interface.dig(:inet, :routes)).sort.each do |destination, details| -%>
 
 [Route]
 <% 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] -%>
 <% end -%>
 Destination=<%= destination %>
 <% if details[:metric] -%>
@@ -47,8 +47,8 @@ Type=<%= details[:type] %>
 <% Hash(@interface.dig(:inet6, :routes)).sort.each do |destination, details| -%>
 
 [Route]
 <% 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] -%>
 <% end -%>
 Destination=<%= destination %>
 <% if details[:metric] -%>