File xfrm-support-displaying-transformations-used-for-Mob.patch of Package iproute2.7171

From: Jan Engelhardt <jengelh@inai.de>
Date: Wed, 21 Jan 2015 22:57:10 +0100
Subject: xfrm: support displaying transformations used for Mobile IPv6
Patch-mainline: No

Patch taken from mip6d-ng c397c3b4a16bb2e31a86f6c5e344a1278d1577c5
and included in openSUSE so as to facilitate mip6d-ng.
---
 ip/ipxfrm.c      | 2 +-
 ip/xfrm_policy.c | 1 +
 ip/xfrm_state.c  | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/ip/ipxfrm.c b/ip/ipxfrm.c
index e583abf75a5c..2e5c11d8a71b 100644
--- a/ip/ipxfrm.c
+++ b/ip/ipxfrm.c
@@ -114,7 +114,7 @@ struct typeent {
 static const struct typeent xfrmproto_types[]= {
 	{ "esp", IPPROTO_ESP }, { "ah", IPPROTO_AH }, { "comp", IPPROTO_COMP },
 	{ "route2", IPPROTO_ROUTING }, { "hao", IPPROTO_DSTOPTS },
-	{ "ipsec-any", IPSEC_PROTO_ANY },
+	{ "ipsec-any", IPSEC_PROTO_ANY }, { "ipv6", IPPROTO_IPV6 },
 	{ NULL, -1 }
 };
 
diff --git a/ip/xfrm_policy.c b/ip/xfrm_policy.c
index efea1e8d1dff..e63f57c1c7d1 100644
--- a/ip/xfrm_policy.c
+++ b/ip/xfrm_policy.c
@@ -93,6 +93,7 @@ static void usage(void)
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_AH));
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_COMP));
+	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_IPV6));
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ROUTING));
 	fprintf(stderr, "%s\n", strxf_xfrmproto(IPPROTO_DSTOPTS));
 	fprintf(stderr, "MODE := transport | tunnel | beet | ro | in_trigger\n");
diff --git a/ip/xfrm_state.c b/ip/xfrm_state.c
index 2dc9cb2c81dd..361f74ee5725 100644
--- a/ip/xfrm_state.c
+++ b/ip/xfrm_state.c
@@ -72,6 +72,7 @@ static void usage(void)
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ESP));
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_AH));
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_COMP));
+	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_IPV6));
 	fprintf(stderr, "%s | ", strxf_xfrmproto(IPPROTO_ROUTING));
 	fprintf(stderr, "%s\n", strxf_xfrmproto(IPPROTO_DSTOPTS));
 	fprintf(stderr, "ALGO-LIST := [ ALGO-LIST ] ALGO\n");
-- 
2.7.0

openSUSE Build Service is sponsored by