aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-02-11 06:22:48 -0500
committerPatrick McHardy <kaber@trash.net>2010-02-11 06:22:48 -0500
commitb87921bdf25485afd8f5a5f25e86b5acef32a9cf (patch)
treed839a1568a74c367a3eda529231002abe15aff79 /net/netfilter
parentd1e7a03f4fee4059ee3fa7ce0edb7c48c1a75fcf (diff)
netfilter: nf_conntrack: show helper and class in /proc/net/nf_conntrack_expect
Make the output a bit more informative by showing the helper an expectation belongs to and the expectation class. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_conntrack_expect.c9
-rw-r--r--net/netfilter/nf_conntrack_sip.c3
2 files changed, 12 insertions, 0 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index 2f25ff610982..33b85f834c06 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -500,6 +500,7 @@ static void exp_seq_stop(struct seq_file *seq, void *v)
500static int exp_seq_show(struct seq_file *s, void *v) 500static int exp_seq_show(struct seq_file *s, void *v)
501{ 501{
502 struct nf_conntrack_expect *expect; 502 struct nf_conntrack_expect *expect;
503 struct nf_conntrack_helper *helper;
503 struct hlist_node *n = v; 504 struct hlist_node *n = v;
504 char *delim = ""; 505 char *delim = "";
505 506
@@ -525,6 +526,14 @@ static int exp_seq_show(struct seq_file *s, void *v)
525 if (expect->flags & NF_CT_EXPECT_INACTIVE) 526 if (expect->flags & NF_CT_EXPECT_INACTIVE)
526 seq_printf(s, "%sINACTIVE", delim); 527 seq_printf(s, "%sINACTIVE", delim);
527 528
529 helper = rcu_dereference(nfct_help(expect->master)->helper);
530 if (helper) {
531 seq_printf(s, "%s%s", expect->flags ? " " : "", helper->name);
532 if (helper->expect_policy[expect->class].name)
533 seq_printf(s, "/%s",
534 helper->expect_policy[expect->class].name);
535 }
536
528 return seq_putc(s, '\n'); 537 return seq_putc(s, '\n');
529} 538}
530 539
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 023966b569bf..419c5cabb332 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -1305,14 +1305,17 @@ static char sip_names[MAX_PORTS][2][sizeof("sip-65535")] __read_mostly;
1305 1305
1306static const struct nf_conntrack_expect_policy sip_exp_policy[SIP_EXPECT_MAX + 1] = { 1306static const struct nf_conntrack_expect_policy sip_exp_policy[SIP_EXPECT_MAX + 1] = {
1307 [SIP_EXPECT_SIGNALLING] = { 1307 [SIP_EXPECT_SIGNALLING] = {
1308 .name = "signalling",
1308 .max_expected = 1, 1309 .max_expected = 1,
1309 .timeout = 3 * 60, 1310 .timeout = 3 * 60,
1310 }, 1311 },
1311 [SIP_EXPECT_AUDIO] = { 1312 [SIP_EXPECT_AUDIO] = {
1313 .name = "audio",
1312 .max_expected = 2 * IP_CT_DIR_MAX, 1314 .max_expected = 2 * IP_CT_DIR_MAX,
1313 .timeout = 3 * 60, 1315 .timeout = 3 * 60,
1314 }, 1316 },
1315 [SIP_EXPECT_VIDEO] = { 1317 [SIP_EXPECT_VIDEO] = {
1318 .name = "video",
1316 .max_expected = 2 * IP_CT_DIR_MAX, 1319 .max_expected = 2 * IP_CT_DIR_MAX,
1317 .timeout = 3 * 60, 1320 .timeout = 3 * 60,
1318 }, 1321 },