]> git.puffer.fish Git - matthieu/frr.git/commit
sharpd: fix avoid twice sending NHG_DEL for a nexthop-group
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 5 Dec 2023 08:56:41 +0000 (09:56 +0100)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 5 Dec 2023 09:06:12 +0000 (10:06 +0100)
commitf806ec101f1d0b154c0cf0bf488d351ab397de7b
treeb341e78258a8d921fa05d4de4acda6d8aadaa668
parent82c1d82d7767570af287b8fa8d887ba8a40015e3
sharpd: fix avoid twice sending NHG_DEL for a nexthop-group

After removing the nexthop of a nexthop group, when the nexthop group
is removed, a nhg removal failure happens:

> ubuntu2204(config)# nexthop-group CCC
> ubuntu2204(config-nh-group)#  nexthop 192.0.2.211 loop1
> ubuntu2204(config-nh-group)# no  nexthop 192.0.2.211 loop1
> [..]
> 2023/12/05 08:59:22 SHARP: [H3QKG-WH8ZV] Removed nhg 179687505
> ubuntu2204(config-nh-group)# exi
> ubuntu2204(config)# no nexthop-group CCC
> [..]
> 2023/12/05 08:59:27 SHARP: [N030J-V0SFN] Failed removal of nhg 179687505

The NHG_DEL message is sent twice at the nexthop deletion, and at the
nexthop-group deletion. Avoid sending it twice.

Fixes: 82beaf6ae520 ("sharpd: fix deleting nhid when suppressing nexthop from nh group")
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
sharpd/sharp_nht.c
sharpd/sharp_zebra.c