]> git.puffer.fish Git - matthieu/frr.git/commit
isisd: Fix crash in ISIS when mtu mismatch occurs
authorlynnemorrison <lynne.morrison@ibm.com>
Wed, 13 Apr 2022 20:07:44 +0000 (16:07 -0400)
committerlynnemorrison <lynne.morrison@ibm.com>
Mon, 18 Apr 2022 15:15:15 +0000 (11:15 -0400)
commitc7b253d0bbcb9e55029bfcd72d2488dd6595a177
treed5ff51bc2232791628e3939cd97628b3c9c86a09
parent926e00236e525aebb9fa49039bec876c222c1c7d
isisd: Fix crash in ISIS when mtu mismatch occurs

When lsp-mtu is configured larger than interface mtu and the interface
is brought up, the ISIS code would crash. When other vendors have this
misconfiguration they just continue ISIS running and allow the LSP
packets to be created but not sent. When the misconfiguration is corrected
the LSP packets start being sent. This change creates that same behavior
in FRR.

The startup issue I am hitting is when the isis lsp-mtu is larger that the interfaces mtu.
We run into this case when we are in the process of changing the mtu on a tunnel.
I issue a shutdown/no shutdown on the interface, because the tunnel MTU is smaller
than the lsp-mtu, it is considered an error and calls circuit_if_del. This deletes
part of the circuit information, which includes the circuit->ip_addr list. Later on we get
an address update from zebra and try to add the interface address to this list and crash.

2022/04/07 20:19:52.032 ISIS: [GTRPJ-X68CG] CSM_EVENT for tun_gw2: IF_UP_FROM_Z
calls isis_circuit_if_add
this initialize the circuit->ip_addrs
isis_circuit_up
has the mtu check circuit->area->lsp_mtu > isis_circuit_pdu_size(circuit) and fails
returns ISIS_ERROR
on failure call isis_circuit_if_del
this deletes the circiut->ip_addrs list <----

2022/04/07 20:19:52.032 ZEBRA: [NXYHN-ZKW2V] zebra_if_addr_update_ctx: INTF_ADDR_ADD: ifindex 3, addr 192.168.0.1/24
message to isisd to add address
isis_zebra_if_address_add
isis_circuit_add_addr
circuit->ip_addr we try to add the ip address to the list, but it was deleted above and isisd crashes

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
isisd/isis_circuit.c
isisd/isis_nb_config.c