From: Ulrich Weber Date: Mon, 13 Sep 2010 15:23:01 +0000 (-0700) Subject: iproute2: display xfrm socket policy direction X-Git-Tag: v2.6.37~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66abc090724a14baa0b931ecab4ea22ce91c4fb0;p=thirdparty%2Fiproute2.git iproute2: display xfrm socket policy direction display socket policy direction Signed-off-by: Ulrich Weber --- diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c index 78e1926d2..99a6756a3 100644 --- a/ip/ipxfrm.c +++ b/ip/ipxfrm.c @@ -861,7 +861,12 @@ 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");