summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_ext.c
diff options
context:
space:
mode:
authorMark Stapp <mjs@voltanet.io>2020-10-21 19:56:26 +0200
committerMark Stapp <mjs@voltanet.io>2020-10-22 19:37:25 +0200
commit96b663a381c2e90fa663d69fce4e40f0be698e58 (patch)
tree061e8297387581dcb5e730f405bf9a5596a58dc1 /ospfd/ospf_ext.c
parentMerge pull request #7343 from ton31337/fix/prefix2str_to_pFX (diff)
downloadfrr-96b663a381c2e90fa663d69fce4e40f0be698e58.tar.xz
frr-96b663a381c2e90fa663d69fce4e40f0be698e58.zip
ospfd: replace inet_ntoa
Stop using inet_ntoa, use %pI4 etc or inet_ntop instead Signed-off-by: Mark Stapp <mjs@voltanet.io>
Diffstat (limited to 'ospfd/ospf_ext.c')
-rw-r--r--ospfd/ospf_ext.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ospfd/ospf_ext.c b/ospfd/ospf_ext.c
index 90dc108c0..104248694 100644
--- a/ospfd/ospf_ext.c
+++ b/ospfd/ospf_ext.c
@@ -1716,8 +1716,8 @@ static uint16_t show_vty_ext_link_rmt_itf_addr(struct vty *vty,
top = (struct ext_subtlv_rmt_itf_addr *)tlvh;
vty_out(vty,
- " Remote Interface Address Sub-TLV: Length %u\n Address: %s\n",
- ntohs(top->header.length), inet_ntoa(top->value));
+ " Remote Interface Address Sub-TLV: Length %u\n Address: %pI4\n",
+ ntohs(top->header.length), &top->value);
return TLV_SIZE(tlvh);
}
@@ -1748,9 +1748,9 @@ static uint16_t show_vty_ext_link_lan_adj_sid(struct vty *vty,
(struct ext_subtlv_lan_adj_sid *)tlvh;
vty_out(vty,
- " LAN-Adj-SID Sub-TLV: Length %u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\tWeight: 0x%x\n\tNeighbor ID: %s\n\t%s: %u\n",
+ " LAN-Adj-SID Sub-TLV: Length %u\n\tFlags: 0x%x\n\tMT-ID:0x%x\n\tWeight: 0x%x\n\tNeighbor ID: %pI4\n\t%s: %u\n",
ntohs(top->header.length), top->flags, top->mtid, top->weight,
- inet_ntoa(top->neighbor_id),
+ &top->neighbor_id,
CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG) ? "Label"
: "Index",
CHECK_FLAG(top->flags, EXT_SUBTLV_LINK_ADJ_SID_VFLG)
@@ -1778,10 +1778,10 @@ static uint16_t show_vty_link_info(struct vty *vty, struct tlv_header *ext)
vty_out(vty,
" Extended Link TLV: Length %u\n Link Type: 0x%x\n"
- " Link ID: %s\n",
+ " Link ID: %pI4\n",
ntohs(top->header.length), top->link_type,
- inet_ntoa(top->link_id));
- vty_out(vty, " Link data: %s\n", inet_ntoa(top->link_data));
+ &top->link_id);
+ vty_out(vty, " Link data: %pI4\n", &top->link_data);
tlvh = (struct tlv_header *)((char *)(ext) + TLV_HDR_SIZE
+ EXT_TLV_LINK_SIZE);
@@ -1858,9 +1858,9 @@ static uint16_t show_vty_pref_info(struct vty *vty, struct tlv_header *ext)
vty_out(vty,
" Extended Prefix TLV: Length %u\n\tRoute Type: %u\n"
- "\tAddress Family: 0x%x\n\tFlags: 0x%x\n\tAddress: %s/%u\n",
+ "\tAddress Family: 0x%x\n\tFlags: 0x%x\n\tAddress: %pI4/%u\n",
ntohs(top->header.length), top->route_type, top->af, top->flags,
- inet_ntoa(top->address), top->pref_length);
+ &top->address, top->pref_length);
tlvh = (struct tlv_header *)((char *)(ext) + TLV_HDR_SIZE
+ EXT_TLV_PREFIX_SIZE);