if (p2p_hello) {
if (circuit->circ_type != CIRCUIT_T_P2P) {
zlog_warn("p2p hello on non p2p circuit");
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit, "p2p hello on non p2p circuit",
+ raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_WARNING;
}
} else {
if (circuit->circ_type != CIRCUIT_T_BROADCAST) {
zlog_warn("lan hello on non broadcast circuit");
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit, "lan hello on non broadcast circuit",
+ raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_WARNING;
}
zlog_debug(
"level %d LAN Hello received over circuit with externalDomain = true",
level);
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit,
+ "LAN Hello received over circuit with externalDomain = true",
+ raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_WARNING;
}
circuit->area->area_tag,
circuit->interface->name);
}
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit, "Interface level mismatch", raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_WARNING;
}
}
"ISIS-Adj (%s): Rcvd %s from (%s) with invalid pdu length %" PRIu16,
circuit->area->area_tag, pdu_name,
circuit->interface->name, iih.pdu_len);
+#ifndef FABRICD
+ isis_notif_reject_adjacency(circuit, "Invalid PDU length",
+ raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_WARNING;
}
flog_err(EC_ISIS_PACKET,
"Level %d LAN Hello with Circuit Type %d", level,
iih.circ_type);
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit, "LAN Hello with wrong IS-level", raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_ERROR;
}
if (isis_unpack_tlvs(STREAM_READABLE(circuit->rcv_stream),
circuit->rcv_stream, &iih.tlvs, &error_log)) {
zlog_warn("isis_unpack_tlvs() failed: %s", error_log);
+#ifndef FABRICD
+ isis_notif_reject_adjacency(circuit, "Failed to unpack TLVs",
+ raw_pdu);
+#endif /* ifndef FABRICD */
goto out;
}
if (!iih.tlvs->area_addresses.count) {
zlog_warn("No Area addresses TLV in %s", pdu_name);
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_area_mismatch(circuit, raw_pdu);
+#endif /* ifndef FABRICD */
goto out;
}
if (!iih.tlvs->protocols_supported.count) {
zlog_warn("No supported protocols TLV in %s", pdu_name);
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit, "No supported protocols TLV", raw_pdu);
+#endif /* ifndef FABRICD */
goto out;
}
zlog_warn(
"ISIS-Adj (%s): Received IIH with own sysid - discard",
circuit->area->area_tag);
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit, "Received IIH with our own sysid", raw_pdu);
+#endif /* ifndef FABRICD */
goto out;
}
circuit->area->area_tag, level,
circuit->interface->name);
}
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_area_mismatch(circuit, raw_pdu);
+#endif /* ifndef FABRICD */
goto out;
}
"ISIS-Adj (%s): Neither IPv4 nor IPv6 considered usable. Ignoring IIH",
circuit->area->area_tag);
}
-
+#ifndef FABRICD
+ isis_notif_reject_adjacency(
+ circuit, "Neither IPv4 not IPv6 considered usable",
+ raw_pdu);
+#endif /* ifndef FABRICD */
goto out;
}
hdr.checksum = stream_getw(circuit->rcv_stream);
hdr.lsp_bits = stream_getc(circuit->rcv_stream);
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_lsp_received(circuit, rawlspid_print(hdr.lsp_id), hdr.seqno,
+ time(NULL), sysid_print(hdr.lsp_id));
+#endif /* ifndef FABRICD */
+
if (pdu_len_validate(hdr.pdu_len, circuit)) {
zlog_debug("ISIS-Upd (%s): LSP %s invalid LSP length %" PRIu16,
circuit->area->area_tag, rawlspid_print(hdr.lsp_id),
circuit->rcv_stream, &tlvs, &error_log)) {
zlog_warn("Something went wrong unpacking the LSP: %s",
error_log);
+#ifndef FABRICD
+ /* send northbound notification. Note that the tlv-type and
+ * offset cannot correctly be set here as they are not returned
+ * by isis_unpack_tlvs, but in there I cannot fire a
+ * notification because I have no circuit information. So until
+ * we change the code above to return those extra fields, we
+ * will send dummy values which are ignored in the callback
+ */
+ isis_notif_lsp_error(circuit, rawlspid_print(hdr.lsp_id),
+ raw_pdu, 0, 0);
+#endif /* ifndef FABRICD */
goto out;
}
} else if (lsp->hdr.rem_lifetime != 0) {
/* our own LSP -> 7.3.16.4 c) */
if (comp == LSP_NEWER) {
+#ifndef FABRICD
+ if (lsp->hdr.seqno < hdr.seqno) {
+ /* send northbound
+ * notification */
+ isis_notif_seqno_skipped(
+ circuit,
+ rawlspid_print(
+ hdr.lsp_id));
+ }
+#endif /* ifndef FABRICD */
lsp_inc_seqno(lsp, hdr.seqno);
lsp_flood_or_update(lsp, NULL,
circuit_scoped);
circuit->area->area_tag,
rawlspid_print(hdr.lsp_id),
lsp->hdr.seqno);
+ } else {
+ /* our own LSP with 0 remaining life time */
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_own_lsp_purge(
+ circuit, rawlspid_print(hdr.lsp_id));
+#endif /* ifndef FABRICD */
}
}
goto out;
if (comp == LSP_NEWER) {
/* 7.3.16.1 */
lsp_inc_seqno(lsp, hdr.seqno);
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_seqno_skipped(circuit,
+ rawlspid_print(hdr.lsp_id));
+#endif /* ifndef FABRICD */
if (isis->debugs & DEBUG_UPDATE_PACKETS) {
zlog_debug(
"ISIS-Upd (%s): (2) re-originating LSP %s new seq 0x%08" PRIx32,
if (version1 != 1) {
zlog_warn("Unsupported ISIS version %" PRIu8, version1);
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_version_skew(circuit, version1, raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_WARNING;
}
"IDFieldLengthMismatch: ID Length field in a received PDU %" PRIu8
", while the parameter for this IS is %u",
id_len, ISIS_SYS_ID_LEN);
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_id_len_mismatch(circuit, id_len, raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_ERROR;
}
if (version2 != 1) {
zlog_warn("Unsupported ISIS PDU version %" PRIu8, version2);
+#ifndef FABRICD
+ /* send northbound notification */
+ isis_notif_version_skew(circuit, version2, raw_pdu);
+#endif /* ifndef FABRICD */
return ISIS_WARNING;
}