From: Tom Hughes Date: Tue, 21 Mar 2023 11:24:11 +0000 (+0000) Subject: Ignore additional routes that point at ourselves X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/fba4fdb729d2f0a74031135b4c2a842b8165fb9d Ignore additional routes that point at ourselves --- diff --git a/cookbooks/networking/templates/default/network.erb b/cookbooks/networking/templates/default/network.erb index ea414bd37..6e1493738 100644 --- a/cookbooks/networking/templates/default/network.erb +++ b/cookbooks/networking/templates/default/network.erb @@ -31,6 +31,7 @@ Metric=<%= @interface[:metric] %> <% end -%> <% end -%> <% Hash(@interface.dig(:inet, :routes)).sort.each do |destination, details| -%> +<% unless details[:via] == @interface[:inet][:address] -%> [Route] <% if details[:via] -%> @@ -44,7 +45,9 @@ Metric=<%= details[:metric] %> Type=<%= details[:type] %> <% end -%> <% end -%> +<% end -%> <% Hash(@interface.dig(:inet6, :routes)).sort.each do |destination, details| -%> +<% unless details[:via] == @interface[:inet6][:address] -%> [Route] <% if details[:via] -%> @@ -58,3 +61,4 @@ Metric=<%= details[:metric] %> Type=<%= details[:type] %> <% end -%> <% end -%> +<% end -%>