You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1843, in call
**cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/loader.py", line 1795, in wrapper
return f(*args, **kwargs)
File "/var/cache/salt/minion/extmods/states/ufw.py", line 85, in allowed
from_addr=from_addr, from_port=from_port, to_addr=to_addr, to_port=to_port)
File "/var/cache/salt/minion/extmods/states/ufw.py", line 45, in _as_rule
cmd.append(_resolve(from_addr))
File "/var/cache/salt/minion/extmods/states/ufw.py", line 27, in _resolve
return socket.gethostbyname(host)
gaierror: [Errno -9] Address family for hostname not supported
IPv6 addresses are getting resolved via socket.gethostbyname(host) causing a failure.
The text was updated successfully, but these errors were encountered:
The regex also returns an empty value (if it would work).
A workaround for this is to disable the gethostbyname for now and the regex, and just return the host as is. Using the gethostbyname like this is also ill-advised as it returns an IPv4 address, not both.
My suggestion would be to completely disable host resolutions and pass everything to UFW as is.
IPv6 addresses are getting resolved via
socket.gethostbyname(host)
causing a failure.The text was updated successfully, but these errors were encountered: