-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bgpd: snmp, fix possible issues when default vrf is not set.
When importing VPN updates in the default VRF, a crash happens when dumping the L3VPN MIB. To illustrate, the following crash log example is displayed: BGP[7301]: Received signal 11 at 1684255316 (si_addr 0x0, PC 0x7fa09b992b05); aborting... BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(zlog_backtrace_sigsafe+0xb3) [0x7fa09bbd93f2] BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(zlog_signal+0x1b4) [0x7fa09bbd9257] BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(+0x10568d) [0x7fa09bc1c68d] BGP[7301]: /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x7fa09b837520] BGP[7301]: /lib/x86_64-linux-gnu/libc.so.6(+0x19db05) [0x7fa09b992b05] BGP[7301]: /usr/lib/x86_64-linux-gnu/frr/modules/bgpd_snmp.so(+0x62ff) [0x7fa09b5f42ff] BGP[7301]: /usr/lib/x86_64-linux-gnu/frr/modules/bgpd_snmp.so(+0x647c) [0x7fa09b5f447c] BGP[7301]: /usr/bin/bgpd(+0x1e1aab) [0x55b1ce417aab] BGP[7301]: /usr/bin/bgpd(+0x1e261b) [0x55b1ce41861b] BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(if_up_via_zapi+0x2c) [0x7fa09bbbe43c] BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(+0x13df63) [0x7fa09bc54f63] BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(+0x14267e) [0x7fa09bc5967e] BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(thread_call+0x1c2) [0x7fa09bc35fcc] BGP[7301]: /lib/x86_64-linux-gnu/libfrr.so.0(frr_run+0x257) [0x7fa09bbcd6e8] BGP[7301]: /usr/bin/bgpd(main+0x4f4) [0x55b1ce2ef98c] BGP[7301]: /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7fa09b81ed90] BGP[7301]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7fa09b81ee40] BGP[7301]: /usr/bin/bgpd(_start+0x25) [0x55b1ce2edae5] BGP[7301]: in thread zclient_read scheduled from /build/make-pkg/output/_packages/cp-routing/src/lib/zclient.c:4397 zclient_event() The 'name' attribute of the BGP instance is attempted to be accessed, in multiple functions. Fix this by using the "default" vrf name, which is returned by the VRF_DEFAULT_NAME macro, wherever the default BGP instance may be used. Signed-off-by: Dmytro Shytyi <[email protected]> Signed-off-by: Philippe guibert <[email protected]>
- Loading branch information
1 parent
45d9af1
commit 967f02b
Showing
3 changed files
with
91 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters