From: Stephen Hemminger <shemminger@vyatta.com>
To: Ulrich Weber <uweber@astaro.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] iproute2: display xfrm socket policy direction
Date: Mon, 13 Sep 2010 08:24:19 -0700 [thread overview]
Message-ID: <20100913082419.360faf4a@nehalam> (raw)
In-Reply-To: <20100913132905.GA8366@babylon>
On Mon, 13 Sep 2010 15:29:05 +0200
Ulrich Weber <uweber@astaro.com> wrote:
>
> display socket policy direction
>
> Signed-off-by: Ulrich Weber <uweber@astaro.com>
> ---
> ip/ipxfrm.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
> index 78e1926..b3ff20b 100644
> --- a/ip/ipxfrm.c
> +++ b/ip/ipxfrm.c
> @@ -861,7 +861,13 @@ void xfrm_policy_info_print(struct xfrm_userpolicy_info *xpinfo,
> STRBUF_CAT(buf, "\t");
>
> fputs(buf, fp);
> - fprintf(fp, "dir ");
> + if (xpinfo->dir >= XFRM_POLICY_MAX) {
> + xpinfo->dir -= XFRM_POLICY_MAX;
> + fprintf(fp, "socket ");
> + }
> + else
> + fprintf(fp, "dir ");
> +
> switch (xpinfo->dir) {
> case XFRM_POLICY_IN:
> fprintf(fp, "in");
Applied (with cleanup) thanks.
--
prev parent reply other threads:[~2010-09-13 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-13 13:29 [PATCH] iproute2: display xfrm socket policy direction Ulrich Weber
2010-09-13 15:24 ` Stephen Hemminger [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100913082419.360faf4a@nehalam \
--to=shemminger@vyatta.com \
--cc=netdev@vger.kernel.org \
--cc=uweber@astaro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).