lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100913132905.GA8366@babylon>
Date:	Mon, 13 Sep 2010 15:29:05 +0200
From:	Ulrich Weber <uweber@...aro.com>
To:	shemminger@...tta.com
Cc:	netdev@...r.kernel.org
Subject: [PATCH] iproute2: display xfrm socket policy direction


display socket policy direction

Signed-off-by: Ulrich Weber <uweber@...aro.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");
-- 
1.7.0.4

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ