diff options
| author | Jafar Al-Gharaibeh <jafar@atcorp.com> | 2022-02-04 15:13:45 -0600 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-04 15:13:45 -0600 | 
| commit | 2da1428ab275a6f4b19f56e4e0a2adfdc5d8c833 (patch) | |
| tree | b0eec7a1021082ee4d4abd54f511fa1714f6b86d /zebra/rtadv.c | |
| parent | e743c1b8e7989d7e3dc9092603bfb638958fa166 (diff) | |
| parent | 446f6ec5eda5de87d9987a15a28f8f528821765f (diff) | |
Merge pull request #10501 from donaldsharp/more_zebra_show
More zebra show
Diffstat (limited to 'zebra/rtadv.c')
| -rw-r--r-- | zebra/rtadv.c | 25 | 
1 files changed, 25 insertions, 0 deletions
diff --git a/zebra/rtadv.c b/zebra/rtadv.c index d64d563771..3bbee83d77 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -47,6 +47,8 @@  extern struct zebra_privs_t zserv_privs; +static uint32_t interfaces_configured_for_ra_from_bgp; +  #if defined(HAVE_RTADV)  #ifndef VTYSH_EXTRACT_PL @@ -1303,6 +1305,9 @@ static void zebra_interface_radv_set(ZAPI_HANDLER_ARGS, int enable)  	zif = ifp->info;  	if (enable) { +		if (!CHECK_FLAG(zif->rtadv.ra_configured, BGP_RA_CONFIGURED)) +			interfaces_configured_for_ra_from_bgp++; +  		SET_FLAG(zif->rtadv.ra_configured, BGP_RA_CONFIGURED);  		ipv6_nd_suppress_ra_set(ifp, RA_ENABLE);  		if (ra_interval @@ -1311,6 +1316,9 @@ static void zebra_interface_radv_set(ZAPI_HANDLER_ARGS, int enable)  				   VTY_RA_INTERVAL_CONFIGURED))  			zif->rtadv.MaxRtrAdvInterval = ra_interval * 1000;  	} else { +		if (CHECK_FLAG(zif->rtadv.ra_configured, BGP_RA_CONFIGURED)) +			interfaces_configured_for_ra_from_bgp--; +  		UNSET_FLAG(zif->rtadv.ra_configured, BGP_RA_CONFIGURED);  		if (!CHECK_FLAG(zif->rtadv.ra_configured,  				VTY_RA_INTERVAL_CONFIGURED)) @@ -2787,6 +2795,8 @@ void rtadv_vrf_terminate(struct zebra_vrf *zvrf)  void rtadv_cmd_init(void)  { +	interfaces_configured_for_ra_from_bgp = 0; +  	hook_register(zebra_if_extra_info, nd_dump_vty);  	hook_register(zebra_if_config_wr, rtadv_config_write); @@ -2886,6 +2896,11 @@ static int if_leave_all_router(int sock, struct interface *ifp)  	return 0;  } +bool rtadv_compiled_in(void) +{ +	return true; +} +  #else  void rtadv_vrf_init(struct zebra_vrf *zvrf)  { @@ -2941,4 +2956,14 @@ void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS)  	return;  } +bool rtadv_compiled_in(void) +{ +	return false; +} +  #endif /* HAVE_RTADV */ + +uint32_t rtadv_get_interfaces_configured_from_bgp(void) +{ +	return interfaces_configured_for_ra_from_bgp; +}  | 
