All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] export conntrack status also on destroy event
@ 2008-05-22  9:13 Fabian Hugelshofer
  2008-06-02  9:52 ` Patrick McHardy
  2008-06-10  9:46 ` Fabian Hugelshofer
  0 siblings, 2 replies; 4+ messages in thread
From: Fabian Hugelshofer @ 2008-05-22  9:13 UTC (permalink / raw)
  To: netfilter-devel

When a conntrack is destroyed, the connection status does not get 
exported to netlink. I don't see a reason for not doing so. This patch 
exports the status on all conntrack events.

--- linux-2.6.25.4.orig/net/netfilter/nf_conntrack_netlink.c	2008-05-20 21:05:05.000000000 +0100
+++ linux-2.6.25.4/net/netfilter/nf_conntrack_netlink.c	2008-05-20 22:21:56.000000000 +0100
@@ -472,14 +472,14 @@
 		goto nla_put_failure;
 	nla_nest_end(skb, nest_parms);
 
+	if (ctnetlink_dump_status(skb, ct) < 0)
+		goto nla_put_failure;
+
 	if (events & IPCT_DESTROY) {
 		if (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 ||
 		    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
 			goto nla_put_failure;
 	} else {
-		if (ctnetlink_dump_status(skb, ct) < 0)
-			goto nla_put_failure;
-
 		if (ctnetlink_dump_timeout(skb, ct) < 0)
 			goto nla_put_failure;
 


--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/3] export conntrack status also on destroy event
  2008-05-22  9:13 [PATCH 1/3] export conntrack status also on destroy event Fabian Hugelshofer
@ 2008-06-02  9:52 ` Patrick McHardy
  2008-06-10  9:46 ` Fabian Hugelshofer
  1 sibling, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2008-06-02  9:52 UTC (permalink / raw)
  To: Fabian Hugelshofer; +Cc: netfilter-devel

Fabian Hugelshofer wrote:
> When a conntrack is destroyed, the connection status does not get 
> exported to netlink. I don't see a reason for not doing so. This patch 
> exports the status on all conntrack events.

Applied, thanks. I've added the missing Signed-off-by: line for you,
please object in case you're not OK with this.



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

* Re: [PATCH 1/3] export conntrack status also on destroy event
  2008-05-22  9:13 [PATCH 1/3] export conntrack status also on destroy event Fabian Hugelshofer
  2008-06-02  9:52 ` Patrick McHardy
@ 2008-06-10  9:46 ` Fabian Hugelshofer
  2008-06-10  9:49   ` Patrick McHardy
  1 sibling, 1 reply; 4+ messages in thread
From: Fabian Hugelshofer @ 2008-06-10  9:46 UTC (permalink / raw)
  To: kaber; +Cc: netfilter-devel

(This is a repost as requested by Patrick. The patch is already applied
to net-next-2.6 but not yet to nf-next-2.6.)

netfilter: ctnetlink: include conntrack status in destroy event message

When a conntrack is destroyed, the connection status does not get 
exported to netlink. I don't see a reason for not doing so. This patch 
exports the status on all conntrack events.

Signed-off-by: Fabian Hugelshofer <hugelshofer2006@gmx.ch>

--- linux-2.6.25.4.orig/net/netfilter/nf_conntrack_netlink.c	2008-05-20 21:05:05.000000000 +0100
+++ linux-2.6.25.4/net/netfilter/nf_conntrack_netlink.c	2008-05-20 22:21:56.000000000 +0100
@@ -472,14 +472,14 @@
 		goto nla_put_failure;
 	nla_nest_end(skb, nest_parms);
 
+	if (ctnetlink_dump_status(skb, ct) < 0)
+		goto nla_put_failure;
+
 	if (events & IPCT_DESTROY) {
 		if (ctnetlink_dump_counters(skb, ct, IP_CT_DIR_ORIGINAL) < 0 ||
 		    ctnetlink_dump_counters(skb, ct, IP_CT_DIR_REPLY) < 0)
 			goto nla_put_failure;
 	} else {
-		if (ctnetlink_dump_status(skb, ct) < 0)
-			goto nla_put_failure;
-
 		if (ctnetlink_dump_timeout(skb, ct) < 0)
 			goto nla_put_failure;
 


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

* Re: [PATCH 1/3] export conntrack status also on destroy event
  2008-06-10  9:46 ` Fabian Hugelshofer
@ 2008-06-10  9:49   ` Patrick McHardy
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick McHardy @ 2008-06-10  9:49 UTC (permalink / raw)
  To: Fabian Hugelshofer; +Cc: netfilter-devel

Fabian Hugelshofer wrote:
> (This is a repost as requested by Patrick. The patch is already applied
> to net-next-2.6 but not yet to nf-next-2.6.)

That means I just didn't push it out before submitting it upstream.
If its in net-next, everything is fine :) Sorry for the confusion.

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

end of thread, other threads:[~2008-06-10  9:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22  9:13 [PATCH 1/3] export conntrack status also on destroy event Fabian Hugelshofer
2008-06-02  9:52 ` Patrick McHardy
2008-06-10  9:46 ` Fabian Hugelshofer
2008-06-10  9:49   ` Patrick McHardy

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.