ufw errors after ctr+c interupt
Bug #1377600 reported by
ilovenwd
This bug affects 10 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ufw (Ubuntu) |
Fix Released
|
Medium
|
Jamie Strandboge | ||
Bionic |
Triaged
|
Medium
|
Unassigned | ||
Cosmic |
Triaged
|
Medium
|
Unassigned | ||
Disco |
Fix Released
|
Medium
|
Jamie Strandboge |
Bug Description
in ufw.util.
```
# Cleanup
cmd([exe, '-F', chain])
(rc, out) = cmd([exe, '-X', chain])
if rc != 0:
raise OSError(
```
if the `ufw xxx` command is interrupt by ctrl+c, the cleanup is not called,
so every ufw cmd afterwards cause error:
```
ERROR: initcaps
[Errno 2] iptables: Chain already exists.
```
I think we should catch error and cleanup in a finally statement.
Or cleanup related rules before ufw init.
Changed in ufw (Ubuntu): | |
importance: | Undecided → Medium |
To post a comment you must log in.
Status changed to 'Confirmed' because the bug affects multiple users.