mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
avoid possible errors with new broadcast handling in linux
This commit is contained in:
parent
cb2cfaebda
commit
08e6c1d82b
1 changed files with 3 additions and 1 deletions
|
@ -1877,10 +1877,12 @@ class LinuxNetwork(Network):
|
|||
if not line:
|
||||
continue
|
||||
words = line.split()
|
||||
broadcast = ''
|
||||
if words[0] == 'inet':
|
||||
if '/' in words[1]:
|
||||
address, netmask_length = words[1].split('/')
|
||||
broadcast = words[3]
|
||||
if len(words) > 3:
|
||||
broadcast = words[3]
|
||||
else:
|
||||
# pointopoint interfaces do not have a prefix
|
||||
address = words[1]
|
||||
|
|
Loading…
Reference in a new issue