diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2020-10-22 08:07:57 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-22 08:07:57 -0400 |
| commit | 84de5a245a3eb17619588a535b9f408ce802a8c9 (patch) | |
| tree | 30eafbdeaf55a170d2bf8d7be0c1b1f34cfc4f90 /zebra/interface.c | |
| parent | e58496183e278767da2cb0886f90397e50cfa5ef (diff) | |
| parent | 2dbe669bdf0f0bcbf0228ccdab7b631bd8b934f1 (diff) | |
Merge pull request #7343 from ton31337/fix/prefix2str_to_pFX
:* Convert prefix2str to %pFX
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 3210855801..0652d3a2ba 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1296,8 +1296,6 @@ static void ifs_dump_brief_vty(struct vty *vty, struct vrf *vrf) bool print_header = true; FOR_ALL_INTERFACES (vrf, ifp) { - char global_pfx[PREFIX_STRLEN] = {0}; - char buf[PREFIX_STRLEN] = {0}; bool first_pfx_printed = false; if (print_header) { @@ -1329,17 +1327,17 @@ static void ifs_dump_brief_vty(struct vty *vty, struct vrf *vrf) if (!CHECK_FLAG(connected->flags, ZEBRA_IFA_SECONDARY)) { p = connected->address; - prefix2str(p, buf, sizeof(buf)); if (first_pfx_printed) { - /* padding to prepare row only for ip addr */ + /* padding to prepare row only + * for ip addr */ vty_out(vty, "%-40s", ""); if (list_size > 1) vty_out(vty, "+ "); - vty_out(vty, "%s\n", buf); + vty_out(vty, "%pFX\n", p); } else { if (list_size > 1) vty_out(vty, "+ "); - vty_out(vty, "%s\n", buf); + vty_out(vty, "%pFX\n", p); } first_pfx_printed = true; break; @@ -1361,17 +1359,17 @@ static void ifs_dump_brief_vty(struct vty *vty, struct vrf *vrf) p = connected->address; /* Don't print link local pfx */ if (!IN6_IS_ADDR_LINKLOCAL(&p->u.prefix6)) { - prefix2str(p, global_pfx, PREFIX_STRLEN); if (first_pfx_printed) { - /* padding to prepare row only for ip addr */ + /* padding to prepare row only + * for ip addr */ vty_out(vty, "%-40s", ""); if (v6_list_size > 1) vty_out(vty, "+ "); - vty_out(vty, "%s\n", global_pfx); + vty_out(vty, "%pFX\n", p); } else { if (v6_list_size > 1) vty_out(vty, "+ "); - vty_out(vty, "%s\n", global_pfx); + vty_out(vty, "%pFX\n", p); } first_pfx_printed = true; break; |
