Merge pull request #13739 from chrrrles/ipaddr_empty_string

ipaddr filter properly handle addresses on /31 networks
This commit is contained in:
Abhijit Menon-Sen 2016-08-25 15:47:08 +05:30 committed by GitHub
commit 1a62fe3874

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):