]> git.proxmox.com Git - mirror_frr.git/commitdiff
isisd, yang: set default network-type to broadcast
authorEmanuele Di Pascale <emanuele@voltanet.io>
Mon, 10 Dec 2018 14:18:25 +0000 (15:18 +0100)
committerEmanuele Di Pascale <emanuele@voltanet.io>
Tue, 18 Dec 2018 14:25:57 +0000 (15:25 +0100)
isisd has both a circ_type and a circ_type_config variable to track
the network tpye of an interface. The former has no default, but the
latter defaults to broadcast. Adding that default makes sure that the
yang leaf won't be deleted, which is something that would not make
sense from an isisd perspective. We will need to add an operational
state leaf to match the potential difference between the configured
network type and the actual network type, since the latter might be
different based on the interface flags received from zebra.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
isisd/isis_northbound.c
yang/frr-isisd.yang

index 6eb77f4f5f09654b69f8e45ed5a20593787b6591..a4672828260fa0e846b842a82e5857d383f49c40 100644 (file)
@@ -2010,15 +2010,6 @@ static int lib_interface_isis_network_type_modify(enum nb_event event,
        return NB_OK;
 }
 
-static int lib_interface_isis_network_type_delete(enum nb_event event,
-                                                 const struct lyd_node *dnode)
-{
-       /* FIXME: This cannot be done in FRR. Not sure what the intended
-        * behavior is.
-        */
-       return NB_OK;
-}
-
 /*
  * XPath: /frr-interface:lib/interface/frr-isisd:isis/passive
  */
@@ -3174,7 +3165,6 @@ const struct frr_yang_module_info frr_isisd_info = {
                {
                        .xpath = "/frr-interface:lib/interface/frr-isisd:isis/network-type",
                        .cbs.modify = lib_interface_isis_network_type_modify,
-                       .cbs.delete = lib_interface_isis_network_type_delete,
                        .cbs.cli_show = cli_show_ip_isis_network_type,
                },
                {
index 23baa6df4950fc876f2cd706f4dcc1a938f7f382..32b4d3acf6a57f7c9f829d84037fcb8973a237c6 100644 (file)
@@ -911,6 +911,7 @@ module frr-isisd {
 
       leaf network-type {
         type network-type;
+        default "broadcast";
         must "(. = \"point-to-point\") or (. = \"broadcast\")";
         description
           "Explicitly configured type of IS-IS circuit (broadcast or point-to-point).";