Topic: nodogsplash, alix, iptables Nonzero exit status

I was having a problem getting nodogsplash started with Kamikaze r13193. 
Note, I don't really know what I am doing, but that has never stopped me :-)

Two problems in /etc/init.d/nodogsplash.init, one after the other:

1)  The first was this test in start():

        if $0 test_module && $WD_DIR/nodogsplash $OPTIONS; then

This resulted in the error:

        alix : Starting nodogsplash ... 
        alix : /etc/rc.common: .: line 74: test_module: not found
        alix : FAILED:  nodogsplash exited with non 0 status

I fixed that with:
        if test_module && $WD_DIR/nodogsplash $OPTIONS; then

   
This allowed me to reach the next error.  nodogsplash start failed randomly, about 4 out of 5 times, with log errors like:

        (fw_iptables.c:86) Nonzero exit status 100 from command: iptables -t mangle -A ndsOUT -s 192.168.58.249 \
        -m mac --mac-source 00:09:6B:86:02:24 -j MARK --set-mark 0x100

(and no, I don't know what status 100 means - it seems to come from an enum in the iptables
source code,  which seems an odd way to reproduceably number errors to inexperienced me -
I expect other people will see different error status numbers).

The errors in my log file were different every time, and iptables -L did not show any of the chains set
up.  When it worked, I saw four "ndsXXX" chains.

Flailing randomly, I added these lines before the if statement in /etc/nodogsplash/nodogsplash.conf:

        ### added KHL
        iptables -t nat    -N ndsOUT       
        iptables -t filter -N ndsRTR       
        iptables -t filter -N ndsNET       
        iptables -t filter -N ndsAUT       
        iptables -t mangle -N ndsTRU       
        ###----                           
        if test_module && $WD_DIR/nodogsplash $OPTIONS; then   

That seems to start it up every time.  I'm guessing that iptables needs more time to set up those chains
than iptables_do_command() in fw_iptables.c in nodogsplash is allowing.  But then, when I fool around
with software I guess a lot.

Any ideas of what I should /really/ be doing?  Is there some way that a clue-challenged semi-newbie
should be reporting this to the folks that care?

Keith

2 (edited by me_too 2009-03-10 16:56:57)

Re: nodogsplash, alix, iptables Nonzero exit status

this is still broken in the 8.09..

update:

I have found out a few additional packages that must be installed for nodogsplash to function..

iptables-mod-ipopt be installed to provide "ipt_mark"
iptables-mod-imq
iptables-mod-filter
iptables-mod-extra
iptables-mod-conntrack-extra

Re: nodogsplash, alix, iptables Nonzero exit status

keithl wrote:

... nodogsplash start failed randomly, about 4 out of 5 times, with log errors like:
        (fw_iptables.c:86) Nonzero exit status 100 from command: iptables -t mangle -A ndsOUT -s 192.168.58.249 \
        -m mac --mac-source 00:09:6B:86:02:24 -j MARK --set-mark 0x100
... I'm guessing that iptables needs more time to set up those chains
than iptables_do_command() in fw_iptables.c in nodogsplash is allowing.

This problem was apparently  due to a race condition between two SIGCHLD handlers.  Signal handling has been cleaned up in nodogsplash version 0.9_beta9.9.3 and this seems to have fixed the problem, according to some reports.

--Paul