]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix 'in6_purgeaddr: err=65, destination address delete failed' message.
authorAlexander V. Chernikov <melifaro@FreeBSD.org>
Mon, 8 Mar 2021 20:27:29 +0000 (20:27 +0000)
committerAlexander V. Chernikov <melifaro@FreeBSD.org>
Thu, 11 Mar 2021 21:38:01 +0000 (21:38 +0000)
commitd4803b958cff52dd14856a2a214c21bea1b69af7
treee7a05774041bcf5f513e1837adb509cca085c754
parent3dbc2213dacbb9a02898f4a16e363464b0f0738e
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
Approved by: re(gjb)
Differential Revision: https://reviews.freebsd.org/D29121

(cherry picked from commit 83cedad139721c6c150be8c078417cfcb311ee78)
sys/netinet6/in6.c