[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.00.1010020048030.2462@ja.ssi.bg>
Date: Sat, 2 Oct 2010 00:50:09 +0300 (EEST)
From: Julian Anastasov <ja@....bg>
To: Simon Horman <horms@...ge.net.au>
cc: lvs-devel@...r.kernel.org, netdev@...r.kernel.org,
netfilter@...r.kernel.org, netfilter-devel@...r.kernel.org,
Jan Engelhardt <jengelh@...ozas.de>,
Stephen Hemminger <shemminger@...tta.com>,
Wensong Zhang <wensong@...ux-vs.org>,
Patrick McHardy <kaber@...sh.net>
Subject: Re: [patch v2 08/12] [PATCH 08/12] IPVS: Add persistence engine data
to /proc/net/ip_vs_conn
Hello,
On Fri, 1 Oct 2010, Simon Horman wrote:
> Index: lvs-test-2.6/net/netfilter/ipvs/ip_vs_conn.c
> ===================================================================
> --- lvs-test-2.6.orig/net/netfilter/ipvs/ip_vs_conn.c 2010-10-01 22:27:17.000000000 +0900
> +++ lvs-test-2.6/net/netfilter/ipvs/ip_vs_conn.c 2010-10-01 22:27:32.000000000 +0900
> @@ -938,30 +938,44 @@ static int ip_vs_conn_seq_show(struct se
>
> if (v == SEQ_START_TOKEN)
> seq_puts(seq,
> - "Pro FromIP FPrt ToIP TPrt DestIP DPrt State Expires\n");
> + "Pro FromIP FPrt ToIP TPrt DestIP DPrt State Expires PEName PEData\n");
> else {
> const struct ip_vs_conn *cp = v;
> + char pe_data[IP_VS_PENAME_MAXLEN + IP_VS_PEDATA_MAXLEN + 3];
> + size_t len = 0;
> +
Add check for cp->dest, it is optional:
> + if (cp->dest->svc->pe && cp->dest->svc->pe->show_pe_data) {
> + pe_data[0] = ' ';
> + len = strlen(cp->dest->svc->pe->name);
> + memcpy(pe_data + 1, cp->dest->svc->pe->name, len);
> + pe_data[len + 1] = ' ';
> + len += 2;
> + len += cp->dest->svc->pe->show_pe_data(cp,
> + pe_data + len);
> + }
> + pe_data[len] = '\0';
Regards
--
Julian Anastasov <ja@....bg>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists