HomeFreeBSD

Fix rt_ifa selection during loopback route insertion process.

Description

Fix rt_ifa selection during loopback route insertion process.

Currently such routes are added with a link-level IFA, which is
plain wrong. Only after the insertion they get fixed by the special
link_rtrequest() ifa handler. This behaviour complicates routing code
and makes ifa selection more complex.

Streamline this process by explicitly moving link_rtrequest() logic

to the pre-insertion rt_getifa_fib() ifa selector. Avoid calling all
this logic in the loopback route case by explicitly specifying
proper rt_ifa inside the ifa_maintain_loopback_route().ยง

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20076

Details