All of lore.kernel.org
 help / color / mirror / Atom feed
* iptables return code 256
@ 2009-02-20 20:33 Ralf
  2009-02-20 20:35 ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf @ 2009-02-20 20:33 UTC (permalink / raw)
  To: netfilter-devel

Sometimes an insert operation (-I) fails and iptables returns 256.
Under which circumstances can iptables give a return code 256 ?

(I guess it happens when an internal resource is in locked state
when user issues the iptables command, right?)  


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iptables return code 256
  2009-02-20 20:33 iptables return code 256 Ralf
@ 2009-02-20 20:35 ` Jan Engelhardt
  2009-02-20 21:58   ` Ralf
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Engelhardt @ 2009-02-20 20:35 UTC (permalink / raw)
  To: Ralf; +Cc: netfilter-devel


On Friday 2009-02-20 21:33, Ralf wrote:

> Sometimes an insert operation (-I) fails and iptables returns 256.
> Under which circumstances can iptables give a return code 256 ?

Never should this happen, because the lower 8 bits of 256 that
make up the exist status are 0 actually.
Or where do you see 256?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iptables return code 256
  2009-02-20 20:35 ` Jan Engelhardt
@ 2009-02-20 21:58   ` Ralf
  2009-02-20 22:10     ` Jan Engelhardt
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf @ 2009-02-20 21:58 UTC (permalink / raw)
  To: netfilter-devel

Jan Engelhardt wrote:
> On Friday 2009-02-20 21:33, Ralf wrote:
> 
>> Sometimes an insert operation (-I) fails and iptables returns 256.
>> Under which circumstances can iptables give a return code 256 ?
> 
> Never should this happen, because the lower 8 bits of 256 that
> make up the exist status are 0 actually.
> Or where do you see 256?

int rc = system(sz);    // sz="iptables ..."

rc is sometimes definitely 256 !

What does it mean?


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: iptables return code 256
  2009-02-20 21:58   ` Ralf
@ 2009-02-20 22:10     ` Jan Engelhardt
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Engelhardt @ 2009-02-20 22:10 UTC (permalink / raw)
  To: Ralf; +Cc: netfilter-devel


On Friday 2009-02-20 22:58, Ralf wrote:
> Jan Engelhardt wrote:
>> On Friday 2009-02-20 21:33, Ralf wrote:
>>
>>> Sometimes an insert operation (-I) fails and iptables returns 256.
>>> Under which circumstances can iptables give a return code 256 ?
>>
>> Never should this happen, because the lower 8 bits of 256 that
>> make up the exist status are 0 actually.
>> Or where do you see 256?
[I thought about $? first...]
>
> int rc = system(sz);    // sz="iptables ..."
>
> rc is sometimes definitely 256 !
>
> What does it mean?

Humph humph, this is not a C forum!

man 3 system:

RETURN VALUE
       The value returned is -1 on  error  (e.g.   fork(2)  failed),  and  the
       return  status  of the command otherwise.  This latter return status is
       in the format specified in wait(2).  Thus, the exit code of the command
       will  be  WEXITSTATUS(status).   In case /bin/sh could not be executed,
       the exit status will be that of a command that does exit(127).

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-20 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 20:33 iptables return code 256 Ralf
2009-02-20 20:35 ` Jan Engelhardt
2009-02-20 21:58   ` Ralf
2009-02-20 22:10     ` Jan Engelhardt

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.