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.
This commit is contained in:
parent
ff213c4bf2
commit
b9ab720e33
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue