From d88e91f427d99f1f8975be716a750221380f73f3 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 26 Sep 2021 16:59:49 +0100 Subject: [PATCH] Avoid installing a private network default route on gateways --- cookbooks/networking/recipes/default.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" -- 2.39.5