]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/networking/templates/default/network.erb
Ignore additional routes that point at ourselves
[chef.git] / cookbooks / networking / templates / default / network.erb
index ea414bd37af14aca1a3f92108d16118688cbda5d..6e1493738961b34c78e875936facd79ad849b75c 100644 (file)
@@ -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 -%>