It restores the bionic implicit lock behavior (as if -w was given), but when given a specific value, in the end it ignores that it couldn't acquire the lock and moves on:
In all these tests, I have a lock held.
We have a chain called "andreas". See how -L waits 1 second as I requested, but moves on, listing the chain:
root@b1-iptables-restore-wait-lock:~# time iptables -L andreas -w 1
Chain andreas (0 references)
target prot opt source destination
real 0m1.005s
user 0m0.004s
sys 0m0.000s
Now I delete the chain. This shouldn't work because another app is holding the lock:
root@b1-iptables-restore-wait-lock:~# time iptables -X andreas -w 1
real 0m1.006s
user 0m0.005s
sys 0m0.000s
Was it deleted? Let's list again, and it was:
root@b1-iptables-restore-wait-lock:~# time iptables -L andreas -w 1
iptables: No chain/target/match by that name.
Thanks for the b3 version!
It restores the bionic implicit lock behavior (as if -w was given), but when given a specific value, in the end it ignores that it couldn't acquire the lock and moves on:
In all these tests, I have a lock held.
We have a chain called "andreas". See how -L waits 1 second as I requested, but moves on, listing the chain: iptables- restore- wait-lock: ~# time iptables -L andreas -w 1
root@b1-
Chain andreas (0 references)
target prot opt source destination
real 0m1.005s
user 0m0.004s
sys 0m0.000s
Now I delete the chain. This shouldn't work because another app is holding the lock: iptables- restore- wait-lock: ~# time iptables -X andreas -w 1
root@b1-
real 0m1.006s
user 0m0.005s
sys 0m0.000s
Was it deleted? Let's list again, and it was: iptables- restore- wait-lock: ~# time iptables -L andreas -w 1
root@b1-
iptables: No chain/target/match by that name.
real 0m1.005s
user 0m0.004s
sys 0m0.000s
root@b1- iptables- restore- wait-lock: ~# apt-cache policy iptables testpkg20210629 b3 testpkg20210629 b3 testpkg20210629 b3 500 ppa.launchpad. net/slashd/ lp1791958/ ubuntu bionic/main amd64 Packages
iptables:
Installed: 1.6.1-2ubuntu2+
Candidate: 1.6.1-2ubuntu2+
Version table:
*** 1.6.1-2ubuntu2+
500 http://