HomeFreeBSD

Create new in6_purgeifaddr() which purges bound ifa prefix if

Description

Create new in6_purgeifaddr() which purges bound ifa prefix if
it gets unused.

Currently if_purgeifaddrs() uses in6_purgeaddr() to remove IPv6
ifaddrs. in6_purgeaddr() does not trrigger prefix removal if
number of linked ifas goes to 0, as this is a low-level function.
As a result, if_purgeifaddrs() purges all IPv4/IPv6 addresses but
keeps corresponding IPv6 prefixes.

Fix this by creating higher-level wrapper which handles unused
prefix usecase and use it in if_purgeifaddrs().

Differential revision: https://reviews.freebsd.org/D28128