HomeFreeBSD

Fix panic when trying to delete non-existent gateway in multipath route.

Description

Fix panic when trying to delete non-existent gateway in multipath route.

IF non-existend gateway was specified, the code responsible for calculating
an updated nexthop group, returned the same already-used nexthop group.
After the route table update, the operation result contained the same
old & new nexthop groups. Thus, the code responsible for decomposing
the notification to the list of simple nexthop-level notifications,
was not able to find any differences. As a result, it hasn't updated any

of the "simple" notification fields, resulting in empty rtentry pointer.

This empty pointer was the direct reason of a panic.

Fix the problem by returning ESRCH when the new nexthop group is the same
as the old one after applying gateway filter.

Reported by: Michael <michael.adm at gmail.com>
PR: 255665
MFC after: 3 days

Details

Provenance
melifaroAuthored on May 7 2021, 8:36 PM
Parents
rGac200a9c3847: pf tests: Test killing matching states
Branches
Unknown
Tags
Unknown