ufw should support '_' in interface names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ufw |
Fix Released
|
Low
|
Jamie Strandboge |
Bug Description
I'm using ufw on an Ubuntu 12.04 server installation and it broke some time ago. Every command now results in the following error (reproduced with 'ufw status'):
Traceback (most recent call last):
File "/usr/sbin/ufw", line 95, in <module>
ui = ufw.frontend.
File "/usr/lib/
self.backend = UFWBackendIptab
File "/usr/lib/
ufw.
File "/usr/lib/
self.
File "/usr/lib/
(dtype, interface) = tmp[-1].split('_')
ValueError: too many values to unpack
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/
os.
OSError: [Errno 2] No such file or directory: '/var/crash/
Original exception was:
Traceback (most recent call last):
File "/usr/sbin/ufw", line 95, in <module>
ui = ufw.frontend.
File "/usr/lib/
self.backend = UFWBackendIptab
File "/usr/lib/
ufw.
File "/usr/lib/
self.
File "/usr/lib/
(dtype, interface) = tmp[-1].split('_')
ValueError: too many values to unpack
If I remember correctly, it worked until I executed the following command:
'ufw allow in on tinc_vpn to any'
I know that there has been a bug in ufw when adding interfaces without digits (see https:/
Today I've added Jamie Strandboge's PPA (ppa:jdstrand/
ufw --version
ufw 0.33~20120810+
ufw is now totally unusable on my system :(
information type: | Private Security → Public Security |
summary: |
- every ufw command results in : "ValueError: too many values to unpack" + ufw should support '_' in interface names |
Changed in ufw: | |
status: | New → Triaged |
Changed in ufw: | |
assignee: | nobody → Jamie Strandboge (jdstrand) |
status: | Triaged → In Progress |
Changed in ufw: | |
importance: | Undecided → Low |
Changed in ufw: | |
milestone: | none → 0.34 |
Changed in ufw: | |
status: | In Progress → Fix Committed |
Changed in ufw: | |
status: | Fix Committed → Fix Released |
Seems that I'm not the only one with this problem:
http:// uname.pingveno. net/blog/ index.php/ post/2012/ 12/15/UFW% 3A-ValueError% 3A-too- many-values- to-unpack
Following the hint from that blog post, I've renamed the interface and fixed the user.rules manually and ufw seems to work again!
However, ufw should really accept and handle all valid interface names correctly. If that's not possible (which I doubt), it should at least warn the user if he adds an "invalid" interface (including a description of what makes it invalid)! Being able to break a firewall daemon with such a simple command is really bad...