]> git.puffer.fish Git - mirror/frr.git/commitdiff
fabricd: Remove processing for unneded PDUs and TLVs
authorChristian Franke <chris@opensourcerouting.org>
Tue, 5 Jun 2018 18:50:59 +0000 (20:50 +0200)
committerChristian Franke <chris@opensourcerouting.org>
Wed, 5 Sep 2018 09:38:13 +0000 (11:38 +0200)
The OpenFabric draft prescribes that any IS-IS PDUs not needed for
OpenFabric operation MUST be ignored. So this commit makes fabricd
ignore any LAN IIHs and any L1 LSPs.

Also the draft specifies that any reachabilities given as narrow-metric
TLVs SHALL be ignored, so adhere to that too.

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

index 8649c5a0c8930f6e5613ac6e83e4e9482f84a55b..d5e9704b0226dc0b3fd214d1a15dac4f7fa71f72 100644 (file)
@@ -1485,11 +1485,17 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
        case L1_LAN_HELLO:
        case L2_LAN_HELLO:
        case P2P_HELLO:
+               if (fabricd && pdu_type != P2P_HELLO)
+                       return ISIS_ERROR;
                retval = process_hello(pdu_type, circuit, ssnpa);
                break;
        case L1_LINK_STATE:
        case L2_LINK_STATE:
        case FS_LINK_STATE:
+               if (fabricd
+                   && pdu_type != L2_LINK_STATE
+                   && pdu_type != FS_LINK_STATE)
+                       return ISIS_ERROR;
                retval = process_lsp(pdu_type, circuit, ssnpa, max_area_addrs);
                break;
        case L1_COMPLETE_SEQ_NUM:
index 25e2d43cea760e8e1c5cece2192096688ae8bd8e..02575a2f6a95f4582893ec217b49d42520a8c7db 100644 (file)
@@ -607,6 +607,9 @@ lspfragloop:
                        for (r = (struct isis_oldstyle_reach *)
                                         lsp->tlvs->oldstyle_reach.head;
                             r; r = r->next) {
+                               if (fabricd)
+                                       continue;
+
                                /* C.2.6 a) */
                                /* Two way connectivity */
                                if (!memcmp(r->id, root_sysid, ISIS_SYS_ID_LEN))
@@ -658,6 +661,9 @@ lspfragloop:
                        &lsp->tlvs->oldstyle_ip_reach_ext};
 
                for (unsigned int i = 0; i < array_size(reachs); i++) {
+                       if (fabricd)
+                               continue;
+
                        vtype = i ? VTYPE_IPREACH_EXTERNAL
                                  : VTYPE_IPREACH_INTERNAL;