diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-10-10 13:30:57 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-10-10 13:30:57 -0400 |
| commit | 28dab7387770f33cbf0f726708ebd085ad93b3f6 (patch) | |
| tree | 5a87ad30cd4ea084362c927030c26ec130bb0275 /bgpd | |
| parent | d2324b7b4a02e9ef6a219578567932addeb7f593 (diff) | |
Revert "bgpd: fix printing link state ospf opaque data"
This reverts commit e1333d12e0d3ba8a9a0ca914dc72d0908dea494e.
Diffstat (limited to 'bgpd')
| -rw-r--r-- | bgpd/bgp_linkstate_tlv.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/bgpd/bgp_linkstate_tlv.c b/bgpd/bgp_linkstate_tlv.c index fbec96a907..dc50f085fc 100644 --- a/bgpd/bgp_linkstate_tlv.c +++ b/bgpd/bgp_linkstate_tlv.c @@ -1353,6 +1353,7 @@ static void bgp_linkstate_tlv_opaque_display(struct vty *vty, uint8_t *pnt, uint8_t *lim = pnt + length; bool ospf_tlv_header; char tlv_type[6]; + int i; if (json) { @@ -1398,15 +1399,21 @@ static void bgp_linkstate_tlv_opaque_display(struct vty *vty, uint8_t *pnt, continue; } - vty_out(vty, "\n%*sTLV type %u: ", indent, "", sub_type); + vty_out(vty, "\n%*sTLV type %u: 0x", indent, "", sub_type); if (pnt + sub_length > lim) { vty_out(vty, "Bad length received: %u\n", sub_length); break; } - bgp_linkstate_tlv_hexa_display(vty, pnt, sub_length, NULL); + for (i = 0; i < sub_length; i++) { + if (i != 0 && i % 8 == 0) + vty_out(vty, " "); + vty_out(vty, "%02x", *pnt); + } } + if (!json) + vty_out(vty, "\n"); } static void bgp_linkstate_tlv_rtm_capability_display(struct vty *vty, |
