From e7a70f390e0cf4ee676060b5a3ebc955c3aac83b Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 24 Jan 2018 10:55:03 -0500 Subject: [PATCH] Treat blank setting for gateway same as unset It was previously trying to use empty string as gateway in some contexts. --- confluent_server/confluent/netutil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/confluent_server/confluent/netutil.py b/confluent_server/confluent/netutil.py index cbe9c2fe..d5457c0d 100644 --- a/confluent_server/confluent/netutil.py +++ b/confluent_server/confluent/netutil.py @@ -83,7 +83,7 @@ def get_nic_config(configmanager, node, ip=None, mac=None): cfgdata['prefix'] = prefixlen for setting in nodenetattribs: gw = nodenetattribs[setting].get('value', None) - if gw is None: + if gw is None or not gw: continue if ip_on_same_subnet(ip, gw, prefixlen): cfgdata['ipv4_gateway'] = gw