All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Simultaneous iptables calls
@ 2006-04-09  4:12 Daniel Webb
  0 siblings, 0 replies; only message in thread
From: Daniel Webb @ 2006-04-09  4:12 UTC (permalink / raw)
  To: lartc

Run this as one process:

#!/bin/sh
while [ 1 = 1 ]; do
    iptables -t mangle -F chain1
    iptables -t mangle -X chain1
    iptables -t mangle -N chain1 || exit 1
done

Run this as another process:

#!/bin/sh
while [ 1 = 1 ]; do
    iptables -t mangle -F chain2
    iptables -t mangle -X chain2
    iptables -t mangle -N chain2 || exit 1
done

and you get:

iptables: No chain/target/match by that name
iptables: No chain/target/match by that name
iptables: Unknown error 4294967295
iptables: Unknown error 4294967295
iptables: Chain already exists
iptables: Unknown error 4294967295
iptables: Unknown error 4294967295
iptables: Unknown error 4294967295
iptables v1.3.5: can't initialize iptables table `mangle': Bad file descriptor
Perhaps iptables or your kernel needs to be upgraded.

<... etc>

I'm don't understand the things going on under the surface, so maybe there is
a reason it's impossible to have some kind of locking to prevent this, like
for example, with chmod:

#!/bin/sh
while [ 1 = 1 ]; do
    chmod 777 mod_me
done

#!/bin/sh
while [ 1 = 1 ]; do
    chmod 666 mod_me
done

(no errors)

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-04-09  4:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-09  4:12 [LARTC] Simultaneous iptables calls Daniel Webb

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.