HomeFreeBSD

routing: fix crash when RTM_CHANGE results in no-op for the multipath

Description

routing: fix crash when RTM_CHANGE results in no-op for the multipath
route.

Reporting logic assumed there is always some nhop change for every
successful modification operation. Explicitly check that the changed
nexthop indeed exists when reporting back to userland.

MFC after: 2 weeks
Reported by: Claudio Jeker <claudio.jeker@klarasystems.com>
Tested by: Claudio Jeker <claudio.jeker@klarasystems.com>

(cherry picked from commit c260d5cd8e364ad448ba714d9f851976c6f8da51)

Details

Provenance
melifaroAuthored on Jun 25 2022, 7:32 PM
Parents
rG1386e7f6ea56: routing: add multipath pytest tests
Branches
Unknown
Tags
Unknown