]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
Fix display of xfrm
authorThomas Egerer <hakke_007@gmx.de>
Tue, 14 Apr 2009 23:15:17 +0000 (16:15 -0700)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Tue, 14 Apr 2009 23:15:17 +0000 (16:15 -0700)
When using iproute2 to display information on policies installed in kernel
(ip x p s) output is incorrect: IPv6 addresses printed as IPv4 addresses.
In case I am dealing with inter protocol policies where the template's address
family differs from those of the policy itself.
The patch attached solves this problem.

ip/ipxfrm.c

index 24b21146b46db4ea4a870c24b06d0a47ee806cae..708ce9fe50b60ff81056f3c215feb6d4deeaef5c 100644 (file)
@@ -609,7 +609,7 @@ static void xfrm_tmpl_print(struct xfrm_user_tmpl *tmpls, int len,
                        fputs(prefix, fp);
 
                xfrm_id_info_print(&tmpl->saddr, &tmpl->id, tmpl->mode,
-                                  tmpl->reqid, family, 0, fp, prefix, "tmpl ");
+                                  tmpl->reqid, tmpl->family, 0, fp, prefix, "tmpl ");
 
                if (show_stats > 0 || tmpl->optional) {
                        if (prefix)