diff options
| author | Christian Franke <chris@opensourcerouting.org> | 2018-06-05 20:50:59 +0200 |
|---|---|---|
| committer | Christian Franke <chris@opensourcerouting.org> | 2018-09-05 11:38:13 +0200 |
| commit | a2d41bb0ee1d18353f9cb58c9073f5805e0903ee (patch) | |
| tree | e52ec1c75cb571e5c6eadf554ec060a2b5d7f26c | |
| parent | 2c92bee49943b5703e183387ac0dd636a9c0e4c4 (diff) | |
fabricd: Remove processing for unneded PDUs and TLVs
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>
| -rw-r--r-- | isisd/isis_pdu.c | 6 | ||||
| -rw-r--r-- | isisd/isis_spf.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index 8649c5a0c8..d5e9704b02 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -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: diff --git a/isisd/isis_spf.c b/isisd/isis_spf.c index 25e2d43cea..02575a2f6a 100644 --- a/isisd/isis_spf.c +++ b/isisd/isis_spf.c @@ -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; |
