Commit b9ab720e authored by Thomas Egerer's avatar Thomas Egerer Committed by Stephen Hemminger

Fix display of xfrm

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.
parent ff213c4b
...@@ -609,7 +609,7 @@ static void xfrm_tmpl_print(struct xfrm_user_tmpl *tmpls, int len, ...@@ -609,7 +609,7 @@ static void xfrm_tmpl_print(struct xfrm_user_tmpl *tmpls, int len,
fputs(prefix, fp); fputs(prefix, fp);
xfrm_id_info_print(&tmpl->saddr, &tmpl->id, tmpl->mode, 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 (show_stats > 0 || tmpl->optional) {
if (prefix) if (prefix)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment