1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

properly handle addresses on /31 networks

This commit is contained in:
Charles Paul 2016-01-06 10:57:52 -06:00
parent f7143d09a6
commit b4ed3a4f52

View file

@ -80,7 +80,8 @@ def _ip_query(v):
if v.size == 1:
return str(v.ip)
if v.size > 1:
if v.ip != v.network:
# /31 networks in netaddr have no broadcast address
if v.ip != v.network or not v.broadcast:
return str(v.ip)
def _gateway_query(v):