ip6_tryforward() hands a packet to ip6_input() when its destination is
one of our addresses, but since bf41d86df0d9 it asks
in6_localip_fib(), which does not count a carp(4) address in BACKUP
state. A BACKUP router that sends a packet to such an address routes it
through the loopback interface, which marks it M_LOOP and passes it back
to ip6_input() with the address's own interface as rcvif.
ip6_tryforward() then forwards it to lo0 again, until the hop limit runs
out, so the router cannot reach its own virtual address. ip6_input()
would deliver it, so this only shows when net.inet6.ip6.redirect is 0.
ip_tryforward() leaves packets received on a loopback interface to
ip_input(). IPv6 loops a packet back with rcvif set to the interface
that owns the address, not lo0, so check M_LOOP instead. The new
carp:backup_local_v6 test pings the virtual address from the BACKUP
router on both forwarding paths.
Fixes: bf41d86df0d9 ("routing: Make ip[6]_tryforward() FIB-aware ...")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")