linux-stable/include/linux/netfilter_ipv4
Rusty Russell 4acdbdbe50 [NETFILTER]: ip_conntrack_expect_related must not free expectation
If a connection tracking helper tells us to expect a connection, and
we're already expecting that connection, we simply free the one they
gave us and return success.

The problem is that NAT helpers (eg. FTP) have to allocate the
expectation first (to see what port is available) then rewrite the
packet.  If that rewrite fails, they try to remove the expectation,
but it was freed in ip_conntrack_expect_related.

This is one example of a larger problem: having registered the
expectation, the pointer is no longer ours to use.  Reference counting
is needed for ctnetlink anyway, so introduce it now.

To have a single "put" path, we need to grab the reference to the
connection on creation, rather than open-coding it in the caller.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-21 13:14:46 -07:00
..
ip_conntrack.h [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_conntrack_amanda.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_core.h [NETFILTER]: Kill lockhelp.h 2005-06-21 14:01:30 -07:00
ip_conntrack_ftp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_helper.h [NETFILTER]: ip_conntrack_expect_related must not free expectation 2005-07-21 13:14:46 -07:00
ip_conntrack_icmp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_irc.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_protocol.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_sctp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_tcp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_tftp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_conntrack_tuple.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_logging.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_nat.h [NETFILTER]: Kill lockhelp.h 2005-06-21 14:01:30 -07:00
ip_nat_core.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_nat_helper.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_nat_protocol.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_nat_rule.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_queue.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_tables.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_addrtype.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_ah.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_CLASSIFY.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_CLUSTERIP.h [NETFILTER]: Fix "iptables -D" rule deletion with ipt_CLUSTERIP target. 2005-06-22 12:38:33 -07:00
ipt_comment.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_connmark.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_CONNMARK.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_conntrack.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_dscp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_DSCP.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_ecn.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_ECN.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_esp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_hashlimit.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_helper.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_iprange.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_length.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_limit.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_LOG.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_mac.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_mark.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_MARK.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_multiport.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_owner.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_physdev.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_pkttype.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_realm.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_recent.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_REJECT.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_SAME.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_sctp.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_state.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_TCPMSS.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_tcpmss.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_TOS.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_tos.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_ttl.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipt_ULOG.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
listhelp.h [NETFILTER]: Kill lockhelp.h 2005-06-21 14:01:30 -07:00