HomeFreeBSD

Fix 'in6_purgeaddr: err=65, destination address delete failed' message.

Description

Fix 'in6_purgeaddr: err=65, destination address delete failed' message.

P2P ifa may require 2 routes: one is the loopback route, another is
the "prefix" route towards its destination.

Current code marks loopback routes existence with IFA_RTSELF and
"prefix" p2p routes with IFA_ROUTE.

For historic reasons, we fill in ifa_dstaddr for loopback interfaces.
To avoid installing the same route twice, we preemptively set
IFA_RTSELF when adding "prefix" route for loopback.
However, the teardown part doesn't have this hack, so we try to
remove the same route twice.

Fix this by checking if ifa_dstaddr is different from the ifa_addr
and moving this logic into a separate function.

Reviewed By: kp
Differential Revision: https://reviews.freebsd.org/D29121

(cherry picked from commit 7634919e15f1147b6f26d55354be375bc9b198db)

Details

Provenance
melifaroAuthored on Mar 8 2021, 8:27 PM
Reviewer
kp
Differential Revision
D29121: Fix 'in6_purgeaddr: err=65, destination address delete failed' message.
Parents
R10:9cd7f222d5c9: Enforce net epoch in in6_selectsrc().
Branches
Unknown
Tags
Unknown