coreos / go-iptables

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

Fix failing test for iptables > 1.6.0 #32

Closed gcmalloc closed 7 years ago

gcmalloc commented 7 years ago

mostly based on #24 with addition of a flag for version < 1.6.0 and modification for the test matrix

squeed commented 7 years ago

So, this fixes a test failure where iptables complains that it doesn't have the lock. However, we're supposedly doing the locking ourselves. Doesn't this just mean there is a bug in go-iptables' locking code, or am I totally confused?

gcmalloc commented 7 years ago

according to the changelog, iptables 1.6.0 replaced the old unix socket locked by a proper flock.

iptables: use flock() instead of abstract unix sockets

So the locking of go-iptables in the test is redundant with the one done by iptables.

squeed commented 7 years ago

Reworked and resubmitted as #38 - thanks!