clicon / rost

Open source router CLI implementation based on CLICON
GNU General Public License v3.0
7 stars 5 forks source link

show ip route crash #7

Open andrnils opened 10 years ago

andrnils commented 10 years ago

Running show ip route crashes the clicon_cli frontend:

>sh ip route 
Oct  2 11:10:41: quaggapi_exec: write show ip route

Oct  2 11:10:45: UNIX error: read: Bad address
Segmentation fault (core dumped)

Same with show ip route bgp

>sh ip route bgp 
Oct  2 11:11:38: quaggapi_exec: write show ip route bgp

Oct  2 11:11:41: UNIX error: read: Bad address
Segmentation fault (core dumped)

This is with a full bgp:

>sh ip bgp summary 
Oct  2 11:15:26: quaggapi_exec: write show ip bgp summary

BGP router identifier 80.252.167.34, local AS number 12381
RIB entries 927745, using 64 MiB of memory
Peers 1, using 2528 bytes of memory

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
80.252.167.33   4 16150  429172    2661        0    0    0 22:10:34   504929

Total number of neighbors 1

Running show ip route 0.0.0.0/4 longer-prefixes works, whereas show ip route 0.0.0.0/3 longer-prefixes segfaults

bholmgren commented 10 years ago

This should be fixed now but required a change in the way Rost communicates with quagga so quagga needs to be updated as well. There is quagga patch for 0.99.23 added to the repostitory. Could you verify that the fix works on your system?

Fredrik-Widell commented 9 years ago

The fix works, a little, a show ip route or a show ip bgp outputs 65535 chars , which is far from a full bgp table, somewhere around a thusand lines. The segfaults are gone.

bholmgren commented 9 years ago

Turned out cligen clipped individual output messages to 64k. The output code in Rost has been rearranged and I have been able to view 100k routes at least. The fix requires an update to clicon and there is an updated quagga patch as well.

olofhagsand commented 9 years ago

Fixed the cligen 64k limitation as well.