coreos / go-iptables

Go wrapper around iptables utility
Apache License 2.0
1.11k stars 257 forks source link

--wait can not set timeout on 1.4.21 #82

Closed yywing closed 2 years ago

yywing commented 3 years ago

https://github.com/coreos/go-iptables/blob/abea47c2ca57b2fa33a189f63a63b0269eec487a/iptables/iptables.go#L599 This func check wait.

https://github.com/coreos/go-iptables/commit/abea47c2ca57b2fa33a189f63a63b0269eec487a This commit add timeout.

But, version >= 1.6.0, support --wait second, 1.4.21 just support --wait no second.

So,

exit status 2: Bad argument `5'
Try `iptables -h' or 'iptables --help' for more information.
# /usr/sbin/iptables -t filter -N ttttt --wait 5
Bad argument `5'
Try `iptables -h' or 'iptables --help' for more information.
# iptables -h
iptables v1.4.21
yywing commented 3 years ago

https://github.com/coreos/go-iptables/pull/83

yywing commented 2 years ago

merged