]> git.puffer.fish Git - mirror/frr.git/commitdiff
fabricd: adjust IS-IS defaults as per draft
authorChristian Franke <chris@opensourcerouting.org>
Thu, 22 Mar 2018 13:58:53 +0000 (14:58 +0100)
committerChristian Franke <chris@opensourcerouting.org>
Wed, 5 Sep 2018 09:38:13 +0000 (11:38 +0200)
OpenFabric specifies that it should always be run with wide metrics via
P2P links and only as Level-2. Implement this as default and remove all
the knobs from fabricd which allow other configuration.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
isisd/isis_circuit.c
isisd/isisd.c

index a18ee19d68d2da92d9fe9d781946171dc7df204e..7ecc71023f7224090e38858e6e07d7cbd18d77c6 100644 (file)
@@ -412,7 +412,7 @@ void isis_circuit_if_add(struct isis_circuit *circuit, struct interface *ifp)
        isis_circuit_if_bind(circuit, ifp);
 
        if (if_is_broadcast(ifp)) {
-               if (circuit->circ_type_config == CIRCUIT_T_P2P)
+               if (fabricd || circuit->circ_type_config == CIRCUIT_T_P2P)
                        circuit->circ_type = CIRCUIT_T_P2P;
                else
                        circuit->circ_type = CIRCUIT_T_BROADCAST;
@@ -976,14 +976,16 @@ int isis_interface_config_write(struct vty *vty)
                        }
 
                        /* ISIS - circuit type */
-                       if (circuit->is_type == IS_LEVEL_1) {
-                               vty_out(vty, " " PROTO_NAME " circuit-type level-1\n");
-                               write++;
-                       } else {
-                               if (circuit->is_type == IS_LEVEL_2) {
-                                       vty_out(vty,
-                                               " " PROTO_NAME " circuit-type level-2-only\n");
+                       if (!fabricd) {
+                               if (circuit->is_type == IS_LEVEL_1) {
+                                       vty_out(vty, " " PROTO_NAME " circuit-type level-1\n");
                                        write++;
+                               } else {
+                                       if (circuit->is_type == IS_LEVEL_2) {
+                                               vty_out(vty,
+                                                       " " PROTO_NAME " circuit-type level-2-only\n");
+                                               write++;
+                                       }
                                }
                        }
 
index a3f15e9de227377b444b0df0b61e905ad7a2e327..609ca450df29ff9f54d916ae56896d0c858714b4 100644 (file)
@@ -105,10 +105,13 @@ struct isis_area *isis_area_create(const char *area_tag)
        area = XCALLOC(MTYPE_ISIS_AREA, sizeof(struct isis_area));
 
        /*
-        * The first instance is level-1-2 rest are level-1, unless otherwise
-        * configured
+        * Fabricd runs only as level-2.
+        * For IS-IS, the first instance is level-1-2 rest are level-1,
+        * unless otherwise configured
         */
-       if (listcount(isis->area_list) > 0)
+       if (fabricd) {
+               area->is_type = IS_LEVEL_2;
+       } else if (listcount(isis->area_list) > 0)
                area->is_type = IS_LEVEL_1;
        else
                area->is_type = IS_LEVEL_1_AND_2;
@@ -1896,16 +1899,18 @@ int isis_config_write(struct vty *vty)
                                write++;
                        }
                        /* ISIS - Metric-Style - when true displays wide */
-                       if (area->newmetric) {
-                               if (!area->oldmetric)
-                                       vty_out(vty, " metric-style wide\n");
-                               else
-                                       vty_out(vty,
-                                               " metric-style transition\n");
-                               write++;
-                       } else {
-                               vty_out(vty, " metric-style narrow\n");
-                               write++;
+                       if (!fabricd) {
+                               if (area->newmetric) {
+                                       if (!area->oldmetric)
+                                               vty_out(vty, " metric-style wide\n");
+                                       else
+                                               vty_out(vty,
+                                                       " metric-style transition\n");
+                                       write++;
+                               } else {
+                                       vty_out(vty, " metric-style narrow\n");
+                                       write++;
+                               }
                        }
                        /* ISIS - overload-bit */
                        if (area->overload_bit) {
@@ -1913,12 +1918,14 @@ int isis_config_write(struct vty *vty)
                                write++;
                        }
                        /* ISIS - Area is-type (level-1-2 is default) */
-                       if (area->is_type == IS_LEVEL_1) {
-                               vty_out(vty, " is-type level-1\n");
-                               write++;
-                       } else if (area->is_type == IS_LEVEL_2) {
-                               vty_out(vty, " is-type level-2-only\n");
-                               write++;
+                       if (!fabricd) {
+                               if (area->is_type == IS_LEVEL_1) {
+                                       vty_out(vty, " is-type level-1\n");
+                                       write++;
+                               } else if (area->is_type == IS_LEVEL_2) {
+                                       vty_out(vty, " is-type level-2-only\n");
+                                       write++;
+                               }
                        }
                        write += isis_redist_config_write(vty, area, AF_INET);
                        write += isis_redist_config_write(vty, area, AF_INET6);