modules/nilrt_ip.py: Add default value for gateway

In case that connman cannot provide a default gateway, then this should
have a default value (0.0.0.0) to keep consistency between various ip
modules.

Signed-off-by: Alexandru Vasiu <alexandru.vasiu@ni.com>
This commit is contained in:
Alexandru Vasiu 2018-02-26 19:49:48 +02:00 committed by Alexandru Vasiu
parent 89d4915d8d
commit 78471f8095

View File

@ -156,7 +156,9 @@ def _get_service_info(service):
state = service_info.get_property('State')
if state == 'ready' or state == 'online':
data['up'] = True
data['ipv4'] = {}
data['ipv4'] = {
'gateway': '0.0.0.0'
}
ipv4 = 'IPv4'
if service_info.get_property('IPv4')['Method'] == 'manual':
ipv4 += '.Configuration'