summaryrefslogtreecommitdiff
path: root/lib/json.c
diff options
context:
space:
mode:
authorG. Paul Ziemba <paulz@labn.net>2018-06-29 14:55:59 -0700
committerG. Paul Ziemba <paulz@labn.net>2018-06-30 10:09:23 -0700
commit3bd70bf8f37bd899b82534d71572714404eb94c9 (patch)
treed625b20e9e85ae505ffb618227ff18d2b89c3435 /lib/json.c
parentc3555a6d1231948d148df2135c3f69934de16e77 (diff)
bgpd: fix NULL dereference in vrf-vpn leak config if before default instance
Issue 2473 VRF-VPN route-leaking configuration commands assumed existence of default bgp instance. If a non-default vrf configuration occurred before the default vrf configuration, it would result in a (NULL) dereference to the non-existent default vrf. This change 1) detects non-existence of default vrf and skips corresponding RIB updating that normally occurs during configuration changes of the route-leaking parameters; and 2) when the default bgp instance is defined, runs the deferred RIB updating. In vpn_leak_to_vrf_update_all(), replace early return if bgp_vpn is NULL with assert, as the former would lead to subtly wrong RIB contents. The underlying issue that led to commit 73aed5841a1fe31e8a1f251dfcf87e1f2b1f2463 should be fixed by the above changes. Signed-off-by: G. Paul Ziemba <paulz@labn.net>
Diffstat (limited to 'lib/json.c')
0 files changed, 0 insertions, 0 deletions