On 29.3.2011 22:15, Rob Crittenden wrote:
Jan Cholasta wrote:
Sorry, forgot to attach the patch.

Is this why you have some blind excepts?

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "ipaserver/install/installutils.py", line 167, in __init__
net = netaddr.IPNetwork(addr)
File "/usr/lib/python2.7/site-packages/netaddr/ip/__init__.py", line
919, in __init__
implicit_prefix, flags)
File "/usr/lib/python2.7/site-packages/netaddr/ip/__init__.py", line
782, in parse_ip_network
value = ip._value
UnboundLocalError: local variable 'ip' referenced before assignment

We should get an upstream bug filed on python-netaddr about this.


Apparently it's already been fixed for the next release.

IMHO it's not much of an issue for us, because the exception gets caught in parse_ip_address and that's currently the only place where _IPAddressWithPrefix is used.

Shoudl parse_ip_address() raise an exception on bad data rather than

I've been down that road and it would need a rewrite of the fragile IP address handling logic of ipa-server-install, which is something I'd rather avoid.

 >>> installutils.parse_ip_address('355.555.3.3')


 >>> installutils.parse_ip_address('')

Should it disallow net addresses like

If you mean network and broadcast addresses, it probably should. It might be a good idea to disallow localhost, multicast and/or link-local addresses too.


Jan Cholasta

Freeipa-devel mailing list

Reply via email to