[quagga-dev 5262] Re: cosmetic show command patch to bgpd/bgp_vty.c

Michael Larson mike at vyatta.com
Wed Feb 13 17:13:09 GMT 2008


%u works too.

Attached is the revised patch.


----- Original Message -----
From: "Paul Jakma" <Paul.Jakma at Sun.COM>
To: "Michael Larson" <mike at vyatta.com>
Cc: quagga-dev at lists.quagga.net
Sent: Wednesday, February 13, 2008 7:18:58 AM (GMT-0800) America/Los_Angeles
Subject: [quagga-dev 5260] Re: cosmetic show command patch to bgpd/bgp_vty.c

On Tue, 12 Feb 2008, Michael Larson wrote:

> If the ASN specified is larger than the max positive value of a signed 
> int--the quagga show command show ip bgp summary will overflow the AS 
> value:
> Where AS = 4294967294
> # show ip bgp summary
> BGP router identifier, local AS number -2
> RIB entries 0, using 0 bytes of memory

> I've attached a small patch (bgpd/bgp_vty.c) that fixes the sprintf 
> statement in 3 places for bgp AS output. thanks!

Oops. Cheers for that.

Why not just use %u though? (as_t is unlikely to change again in the 
foreseeable future).

Paul Jakma,
Solaris Networking                       Sun Microsystems, Scotland
http://opensolaris.org/os/project/quagga tel: EMEA x73150 / +44 15066 73150
Quagga-dev mailing list
Quagga-dev at lists.quagga.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bgp_vty.c_patch
Type: application/octet-stream
Size: 1491 bytes
Desc: not available
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20080213/dad4efa5/attachment-0001.obj>

More information about the Quagga-dev mailing list