]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Fix format specifier for 4-byte asn print
authorKiran Kella <kiran.kella@broadcom.com>
Mon, 4 Feb 2019 07:05:59 +0000 (12:35 +0530)
committerQuentin Young <qlyoung@cumulusnetworks.com>
Wed, 6 Feb 2019 19:22:42 +0000 (19:22 +0000)
In show ip bgp peer-group, the 4-byte ASN is printed as signed int.
Corrected the format specifier in such places in bgp_vty.c

Signed-off-by: Kiran Kella <kiran.kella@broadcom.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
bgpd/bgp_vty.c

index e54a873e15f2590a574d4f055fbd11107253fc83..f7ec2780ef5f820d398d4913aa894391b180f9e3 100644 (file)
@@ -9001,7 +9001,7 @@ static void bgp_show_peer(struct vty *vty, struct peer *p, uint8_t use_json,
        } else {
                if ((p->as_type == AS_SPECIFIED) || (p->as_type == AS_EXTERNAL)
                    || (p->as_type == AS_INTERNAL))
-                       vty_out(vty, "remote AS %u, ", p->as);
+                       vty_out(vty, "remote AS %" PRIu32 ", ", p->as);
                else
                        vty_out(vty, "remote AS Unspecified, ");
                vty_out(vty, "local AS %u%s%s, ",
@@ -11405,11 +11405,11 @@ static int bgp_show_one_peer_group(struct vty *vty, struct peer_group *group)
        conf = group->conf;
 
        if (conf->as_type == AS_SPECIFIED || conf->as_type == AS_EXTERNAL) {
-               vty_out(vty, "\nBGP peer-group %s, remote AS %d\n", group->name,
-                       conf->as);
+               vty_out(vty, "\nBGP peer-group %s, remote AS %" PRIu32 "\n",
+                       group->name, conf->as);
        } else if (conf->as_type == AS_INTERNAL) {
-               vty_out(vty, "\nBGP peer-group %s, remote AS %d\n", group->name,
-                       group->bgp->as);
+               vty_out(vty, "\nBGP peer-group %s, remote AS %" PRIu32 "\n",
+                       group->name, group->bgp->as);
        } else {
                vty_out(vty, "\nBGP peer-group %s\n", group->name);
        }