Skip to contentSkip to conversation

bump the expectation helper name

PATCH Applied Pablo Neira Ayuso 1 participant 1 message Jul 30, 2008

Subsystems (2)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 6/7 bump the expectation helper name

[PATCH] bump the expectation helper name

Include the expectation helper name at expectation dumping.

Signature · 1 line
"Los honestos son inadaptados sociales" -- Les Luthiers

[PATCH] bump the expectation helper name

Include the expectation helper name at expectation dumping.

net/netfilter/nf_conntrack_netlink.c +9 -0
Index: net-next-2.6.git/net/netfilter/nf_conntrack_netlink.c
===================================================================
@@ -1375,6 +1375,7 @@ ctnetlink_exp_dump_expect(struct sk_buff
 			  const struct nf_conntrack_expect *exp)
 {
 	struct nf_conn *master = exp->master;
+	struct nf_conn_help *help = nfct_help(master);
 	long timeout = (exp->timeout.expires - jiffies) / HZ;
 
 	if (timeout < 0)
@@ -1392,6 +1393,14 @@ ctnetlink_exp_dump_expect(struct sk_buff
 	NLA_PUT_BE32(skb, CTA_EXPECT_TIMEOUT, htonl(timeout));
 	NLA_PUT_BE32(skb, CTA_EXPECT_ID, htonl((unsigned long)exp));
 
+	if (help) {
+		struct nf_conntrack_helper *helper;
+
+		helper = rcu_dereference(help->helper);
+		if (helper)
+			NLA_PUT_STRING(skb, CTA_EXPECT_HELP_NAME, helper->name);
+	}
+
 	return 0;
 
 nla_put_failure: