isisd: fix local address TE TLV

we were not correctly checking the MPLS-TE status of the area when
adding an IP address to a circuit, and this was preventing the local
address TLV to be populated after an interfaced flap.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
This commit is contained in:
Emanuele Di Pascale 2020-05-28 15:46:56 +02:00
parent 276b698a43
commit d80e23f8d3

View File

@ -267,7 +267,8 @@ void isis_circuit_add_addr(struct isis_circuit *circuit,
listnode_add(circuit->ip_addrs, ipv4);
/* Update Local IP address parameter if MPLS TE is enable */
if (circuit->ext && IS_MPLS_TE(circuit->ext)) {
if (circuit->ext && circuit->area
&& IS_MPLS_TE(circuit->area->mta)) {
circuit->ext->local_addr.s_addr = ipv4->prefix.s_addr;
SET_SUBTLV(circuit->ext, EXT_LOCAL_ADDR);
}