IPT_RETURN is not worked in the kernel 2.6.10
Sorry, after understanding the meaning of ipt_do_table function. I know currently the IPT_RETURN is only available in the standard target. But I wonder why don't we have the IPT_RETURN in the user defined target?
Can we create a IPT_RETURN in the user defined target. So that we can use the IPT_RETURN in our target to return to the upper chain.
What I mean is "can we port the IPT_RETURN to the user defined target in the ipt_do_table function?"
Vincent
Quoted 41 lines
-----Original Message-----
From: Vincent [mailto:[email protected]]
Sent: Tuesday, September 20, 2005 4:56 PM
To: '[email protected]'
Subject:IPT_RETURNis not worked in the kernel 2.6.10Hello folks,
I am currently writing a iptables target. And I want to use the
IPT_RETURNas the return value from target. But I found thatIPT_RETURNwill result asNF_ACCEPTdoes. What I mean is, while I useIPT_RETURNin my target module. It will not go back to the upper directory. Does anyone ever experience the same problem?Enviroment:
linux kernel 2.6.10
Iptables 1.2.9Vincent
The following code is part of the
ipt_do_tablein theip_tables.cBut I don’t know how to modify it to fix the bug? :(if (!t->u.kernel.target->target) { int v; v = ((struct ipt_standard_target *)t)->verdict; if (v < 0) { /* Pop from stack? */ if (v != IPT_RETURN) { verdict = (unsigned)(-v) - 1; break; } e = back; back = get_entry(table_base, back->comefrom); continue; }