]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
iproute2: Format IPv6 tunnels endpoints nicely.
authorDavid Lamparter <lists@diac24.net>
Sat, 9 Jun 2007 13:53:58 +0000 (15:53 +0200)
committerStephen Hemminger <shemminger@linux-foundation.org>
Tue, 19 Jun 2007 23:29:05 +0000 (16:29 -0700)
Change formatting of IPv6 tunnel endpoints from hex chain to standard IPv6
representation.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
lib/ll_addr.c

index 581487dfaff0f3e620ea0eed036431a4d6aa70cb..f558050e350735fad3fe62664fa7a6eb1a4f39e0 100644 (file)
@@ -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) {