mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-29 17:13:46 +00:00
bgpd: rfapi: avoid null pointer dereference in vnc_export_bgp_disable if rfapi is not provisioned
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
This commit is contained in:
parent
58e7db106d
commit
b8e031e542
@ -2049,6 +2049,9 @@ void vnc_direct_bgp_rh_reexport(struct bgp *bgp, afi_t afi)
|
|||||||
*/
|
*/
|
||||||
void vnc_export_bgp_enable(struct bgp *bgp, afi_t afi)
|
void vnc_export_bgp_enable(struct bgp *bgp, afi_t afi)
|
||||||
{
|
{
|
||||||
|
if (!bgp->rfapi_cfg)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (bgp->rfapi_cfg->flags & BGP_VNC_CONFIG_EXPORT_BGP_MODE_BITS) {
|
switch (bgp->rfapi_cfg->flags & BGP_VNC_CONFIG_EXPORT_BGP_MODE_BITS) {
|
||||||
case BGP_VNC_CONFIG_EXPORT_BGP_MODE_NONE:
|
case BGP_VNC_CONFIG_EXPORT_BGP_MODE_NONE:
|
||||||
break;
|
break;
|
||||||
@ -2069,6 +2072,9 @@ void vnc_export_bgp_enable(struct bgp *bgp, afi_t afi)
|
|||||||
|
|
||||||
void vnc_export_bgp_disable(struct bgp *bgp, afi_t afi)
|
void vnc_export_bgp_disable(struct bgp *bgp, afi_t afi)
|
||||||
{
|
{
|
||||||
|
if (!bgp->rfapi_cfg)
|
||||||
|
return;
|
||||||
|
|
||||||
switch (bgp->rfapi_cfg->flags & BGP_VNC_CONFIG_EXPORT_BGP_MODE_BITS) {
|
switch (bgp->rfapi_cfg->flags & BGP_VNC_CONFIG_EXPORT_BGP_MODE_BITS) {
|
||||||
case BGP_VNC_CONFIG_EXPORT_BGP_MODE_NONE:
|
case BGP_VNC_CONFIG_EXPORT_BGP_MODE_NONE:
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user