]> git.openstreetmap.org Git - chef.git/commitdiff
Avoid installing a private network default route on gateways
authorTom Hughes <tom@compton.nu>
Sun, 26 Sep 2021 15:59:49 +0000 (16:59 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 26 Sep 2021 15:59:49 +0000 (16:59 +0100)
cookbooks/networking/recipes/default.rb

index 275f732d1d492bfca1d836fa69d5289dd77bf7de..4fbf463f219f48651c9c38722e2b4eab55a9292d 100644 (file)
@@ -104,7 +104,7 @@ node[:networking][:interfaces].each do |name, interface|
       deviceplan["parameters"]["lacp-rate"] = interface[:bond][:lacprate] if interface[:bond][:lacprate]
     end
 
-    if interface[:gateway]
+    if interface[:gateway] && interface[:gateway] != interface[:address]
       if interface[:family] == "inet"
         default_route = "0.0.0.0/0"
       elsif interface[:family] == "inet6"