Merge pull request #13739 from chrrrles/ipaddr_empty_string

ipaddr filter properly handle addresses on /31 networks
pull/17241/head
Abhijit Menon-Sen 8 years ago committed by GitHub
commit 1a62fe3874

@ -80,7 +80,8 @@ def _ip_query(v):
if v.size == 1: if v.size == 1:
return str(v.ip) return str(v.ip)
if v.size > 1: 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) return str(v.ip)
def _gateway_query(v): def _gateway_query(v):

Loading…
Cancel
Save