mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 08:32:45 +00:00
isisd: implement the 'area-mismatch' notification
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This commit is contained in:
parent
af6911c98c
commit
9d92b84be7
@ -2733,6 +2733,28 @@ void isis_notif_reject_adjacency(const struct isis_circuit *circuit,
|
|||||||
nb_notification_send(xpath, arguments);
|
nb_notification_send(xpath, arguments);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* XPath:
|
||||||
|
* /frr-isisd:area-mismatch
|
||||||
|
*/
|
||||||
|
void isis_notif_area_mismatch(const struct isis_circuit *circuit,
|
||||||
|
const char *raw_pdu)
|
||||||
|
{
|
||||||
|
const char *xpath = "/frr-isisd:area-mismatch";
|
||||||
|
struct list *arguments = yang_data_list_new();
|
||||||
|
char xpath_arg[XPATH_MAXLEN];
|
||||||
|
struct yang_data *data;
|
||||||
|
struct isis_area *area = circuit->area;
|
||||||
|
|
||||||
|
notif_prep_instance_hdr(xpath, area, "default", arguments);
|
||||||
|
notif_prepr_iface_hdr(xpath, circuit, arguments);
|
||||||
|
snprintf(xpath_arg, sizeof(xpath_arg), "%s/raw-pdu", xpath);
|
||||||
|
data = yang_data_new(xpath_arg, raw_pdu);
|
||||||
|
listnode_add(arguments, data);
|
||||||
|
|
||||||
|
nb_notification_send(xpath, arguments);
|
||||||
|
}
|
||||||
|
|
||||||
/* clang-format off */
|
/* clang-format off */
|
||||||
const struct frr_yang_module_info frr_isisd_info = {
|
const struct frr_yang_module_info frr_isisd_info = {
|
||||||
.name = "frr-isisd",
|
.name = "frr-isisd",
|
||||||
|
@ -683,6 +683,10 @@ static int process_hello(uint8_t pdu_type, struct isis_circuit *circuit,
|
|||||||
|
|
||||||
if (!iih.tlvs->area_addresses.count) {
|
if (!iih.tlvs->area_addresses.count) {
|
||||||
zlog_warn("No Area addresses TLV in %s", pdu_name);
|
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;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -736,6 +740,10 @@ static int process_hello(uint8_t pdu_type, struct isis_circuit *circuit,
|
|||||||
circuit->area->area_tag, level,
|
circuit->area->area_tag, level,
|
||||||
circuit->interface->name);
|
circuit->interface->name);
|
||||||
}
|
}
|
||||||
|
#ifndef FABRICD
|
||||||
|
/* send northbound notification */
|
||||||
|
isis_notif_area_mismatch(circuit, raw_pdu);
|
||||||
|
#endif /* ifndef FABRICD */
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -245,6 +245,8 @@ extern void isis_notif_adj_state_change(const struct isis_adjacency *adj,
|
|||||||
extern void isis_notif_reject_adjacency(const struct isis_circuit *circuit,
|
extern void isis_notif_reject_adjacency(const struct isis_circuit *circuit,
|
||||||
const char *reason,
|
const char *reason,
|
||||||
const char *raw_pdu);
|
const char *raw_pdu);
|
||||||
|
extern void isis_notif_area_mismatch(const struct isis_circuit *circuit,
|
||||||
|
const char *raw_pdu);
|
||||||
/* Master of threads. */
|
/* Master of threads. */
|
||||||
extern struct thread_master *master;
|
extern struct thread_master *master;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user