From: Tom Hughes Date: Sun, 26 Sep 2021 15:59:49 +0000 (+0100) Subject: Avoid installing a private network default route on gateways X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/d88e91f427d99f1f8975be716a750221380f73f3?hp=1fbffc36d83dc3b9fa55788e7e561a3133c807e5 Avoid installing a private network default route on gateways --- diff --git a/cookbooks/networking/recipes/default.rb b/cookbooks/networking/recipes/default.rb index 275f732d1..4fbf463f2 100644 --- a/cookbooks/networking/recipes/default.rb +++ b/cookbooks/networking/recipes/default.rb @@ -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"