netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iproute2: Format IPv6 tunnels endpoints nicely.
@ 2007-06-09 13:53 David Lamparter
  2007-06-19 23:29 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: David Lamparter @ 2007-06-09 13:53 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

Change formatting of IPv6 tunnel endpoints from hex chain to standard IPv6
representation.

Signed-off-by: David Lamparter <equinox@diac24.net>

---
 lib/ll_addr.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/ll_addr.c b/lib/ll_addr.c
index 581487d..f558050 100644
--- a/lib/ll_addr.c
+++ b/lib/ll_addr.c
@@ -38,6 +38,9 @@ const char *ll_addr_n2a(unsigned char *addr, int alen, int type, char *buf, int
 	    (type == ARPHRD_TUNNEL || type == ARPHRD_SIT || type == ARPHRD_IPGRE)) {
 		return inet_ntop(AF_INET, addr, buf, blen);
 	}
+	if (alen == 16 && type == ARPHRD_TUNNEL6) {
+		return inet_ntop(AF_INET6, addr, buf, blen);
+	}
 	l = 0;
 	for (i=0; i<alen; i++) {
 		if (i==0) {
-- 
1.5.0.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-06-19 23:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-09 13:53 [PATCH] iproute2: Format IPv6 tunnels endpoints nicely David Lamparter
2007-06-19 23:29 ` Stephen Hemminger

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