mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-02 16:57:25 +00:00
rfapi: explicitly test against success of is_configured.
Signed-off-by: Lou Berger <lberger@labn.net>
This commit is contained in:
parent
41fd9520c2
commit
008275909b
@ -122,7 +122,7 @@ int rfapi_get_response_lifetime_default(void *rfp_start_val)
|
||||
/*------------------------------------------
|
||||
* rfapi_is_vnc_configured
|
||||
*
|
||||
* Returns if VNC (BGP VPN messaging /VPN & encap SAFIs) are configured
|
||||
* Returns if VNC is configured
|
||||
*
|
||||
* input:
|
||||
* rfp_start_val value returned by rfp_start or
|
||||
@ -137,7 +137,9 @@ int rfapi_get_response_lifetime_default(void *rfp_start_val)
|
||||
int rfapi_is_vnc_configured(void *rfp_start_val)
|
||||
{
|
||||
struct bgp *bgp = rfapi_bgp_lookup_by_rfp(rfp_start_val);
|
||||
return bgp_rfapi_is_vnc_configured(bgp);
|
||||
if (bgp_rfapi_is_vnc_configured(bgp) == 0)
|
||||
return 0;
|
||||
return ENXIO;
|
||||
}
|
||||
|
||||
|
||||
|
@ -862,7 +862,7 @@ extern int rfapi_get_response_lifetime_default(void *rfp_start_val);
|
||||
/*------------------------------------------
|
||||
* rfapi_is_vnc_configured
|
||||
*
|
||||
* Returns if VNC (BGP VPN messaging /VPN & encap SAFIs) are configured
|
||||
* Returns if VNC is configured
|
||||
*
|
||||
* input:
|
||||
* rfp_start_val value returned by rfp_start or
|
||||
|
@ -4074,12 +4074,12 @@ DEFUN (clear_vnc_mac_all_prefix,
|
||||
/* copied from rfp_vty.c */
|
||||
static int check_and_display_is_vnc_running(struct vty *vty)
|
||||
{
|
||||
if (!bgp_rfapi_is_vnc_configured(NULL))
|
||||
if (bgp_rfapi_is_vnc_configured(NULL) == 0)
|
||||
return 1; /* is running */
|
||||
|
||||
if (vty) {
|
||||
vty_out(vty,
|
||||
"VNC is not configured. (There are no configured BGP VPN SAFI peers.)\n");
|
||||
"VNC is not configured.\n");
|
||||
}
|
||||
return 0; /* not running */
|
||||
}
|
||||
@ -4089,7 +4089,7 @@ static int rfapi_vty_show_nve_summary(struct vty *vty,
|
||||
{
|
||||
struct bgp *bgp_default = bgp_get_default();
|
||||
struct rfapi *h;
|
||||
int is_vnc_running = !bgp_rfapi_is_vnc_configured(bgp_default);
|
||||
int is_vnc_running = (bgp_rfapi_is_vnc_configured(bgp_default) == 0);
|
||||
|
||||
int active_local_routes;
|
||||
int active_remote_routes;
|
||||
|
Loading…
Reference in New Issue
Block a user