]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/netfilter/nf_conntrack_expect.c
netfilter: nf_conntrack: show helper and class in /proc/net/nf_conntrack_expect
[net-next-2.6.git] / net / netfilter / nf_conntrack_expect.c
index 2f25ff61098298b40f1014988591b10ec0fbae77..33b85f834c063d82dcca75b9439367b971415e1e 100644 (file)
@@ -500,6 +500,7 @@ static void exp_seq_stop(struct seq_file *seq, void *v)
 static int exp_seq_show(struct seq_file *s, void *v)
 {
        struct nf_conntrack_expect *expect;
+       struct nf_conntrack_helper *helper;
        struct hlist_node *n = v;
        char *delim = "";
 
@@ -525,6 +526,14 @@ static int exp_seq_show(struct seq_file *s, void *v)
        if (expect->flags & NF_CT_EXPECT_INACTIVE)
                seq_printf(s, "%sINACTIVE", delim);
 
+       helper = rcu_dereference(nfct_help(expect->master)->helper);
+       if (helper) {
+               seq_printf(s, "%s%s", expect->flags ? " " : "", helper->name);
+               if (helper->expect_policy[expect->class].name)
+                       seq_printf(s, "/%s",
+                                  helper->expect_policy[expect->class].name);
+       }
+
        return seq_putc(s, '\n');
 }