netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about ipt_REJECT
@ 2009-12-29  7:37 Xiong Wu
  2009-12-30  3:36 ` Bin Liang
  2010-01-04 12:57 ` Patrick McHardy
  0 siblings, 2 replies; 5+ messages in thread
From: Xiong Wu @ 2009-12-29  7:37 UTC (permalink / raw)
  To: netfilter-devel

Hi All,

I found the TCP RST packet sent from ipt_REJECT target isn't able to
update related conntrack state.

I install a 2.6.30.10 kernel as a router and add a iptables rule with
REJECT target to reset specific connections.  However  I found  when
the packets is handled by the ipt_REJECT and the TCP RST packet is
sent, the related conntrack state isn't updated to CLOSE state.

Then I review the ipt_REJECT codes. I found the target attach the old
conntrack to RST packet as:
{
   nf_ct_attach(nskb, oldskb);
   ip_local_out(nskb);
}

Therefor the nf_conntrack_in() will ignore this RST packet due to the
nfct is valid in skb.
{
     if (skb->nfct) {
                    NF_CT_STAT_INC_ATOMIC(net, ignore);
                    return NF_ACCEPT;
     }
}


Is there any reason to attach the old conntrack to new RST skb?  I
think let the RST packet lookup and update related conntrack is
better.


Thanks,
Sean

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

end of thread, other threads:[~2010-01-11 11:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-29  7:37 Question about ipt_REJECT Xiong Wu
2009-12-30  3:36 ` Bin Liang
2010-01-04 12:57 ` Patrick McHardy
2010-01-10 13:24   ` Xiong Wu
2010-01-11 11:08     ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).