diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-17 14:28:13 +0200 | 
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2024-01-28 23:28:39 +0200 | 
| commit | efa18c6c6ff84a71c70435d901421599500af5d2 (patch) | |
| tree | cf26f9c7b42bbebf143ba76e1ef846911102e040 /zebra/zebra_nb_config.c | |
| parent | d9a798e0adf420594305de0beadb6b5d0635453d (diff) | |
zebra: convert inteface multicast command to NB
Introduce new "[no] multicast <enable|disable>" command to be able to
remove the configuration. Current "[no] multicast" command cannot be
removed. Current command is hidden but still works for backwards
compatibility.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'zebra/zebra_nb_config.c')
| -rw-r--r-- | zebra/zebra_nb_config.c | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/zebra/zebra_nb_config.c b/zebra/zebra_nb_config.c index 98c241b2a1..c51250e76f 100644 --- a/zebra/zebra_nb_config.c +++ b/zebra/zebra_nb_config.c @@ -999,10 +999,14 @@ int lib_interface_zebra_multicast_modify(struct nb_cb_modify_args *args)  		return NB_OK;  	struct interface *ifp; +	bool multicast = yang_dnode_get_bool(args->dnode, NULL);  	ifp = nb_running_get_entry(args->dnode, NULL, true); -	if_multicast_set(ifp); +	if (multicast) +		if_multicast_set(ifp); +	else +		if_multicast_unset(ifp);  	return NB_OK;  } @@ -1013,10 +1017,12 @@ int lib_interface_zebra_multicast_destroy(struct nb_cb_destroy_args *args)  		return NB_OK;  	struct interface *ifp; +	struct zebra_if *zif;  	ifp = nb_running_get_entry(args->dnode, NULL, true); +	zif = ifp->info; -	if_multicast_unset(ifp); +	zif->multicast = IF_ZEBRA_DATA_UNSPEC;  	return NB_OK;  }  | 
