Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Daniel Webb <lists@danielwebb.us>
To: lartc@vger.kernel.org
Subject: [LARTC] Simultaneous iptables calls
Date: Sun, 09 Apr 2006 04:12:35 +0000	[thread overview]
Message-ID: <20060409041235.GG2858@drivebymail.com> (raw)

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

                 reply	other threads:[~2006-04-09  4:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060409041235.GG2858@drivebymail.com \
    --to=lists@danielwebb.us \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox