* Return 1 if an internet address is for the local host and configured * on one of its interfaces. */
| 1736 | * on one of its interfaces. |
| 1737 | */ |
| 1738 | int |
| 1739 | in6_localip(struct in6_addr *in6) |
| 1740 | { |
| 1741 | struct rm_priotracker in6_ifa_tracker; |
| 1742 | struct in6_ifaddr *ia; |
| 1743 | |
| 1744 | IN6_IFADDR_RLOCK(&in6_ifa_tracker); |
| 1745 | CK_LIST_FOREACH(ia, IN6ADDR_HASH(in6), ia6_hash) { |
| 1746 | if (IN6_ARE_ADDR_EQUAL(in6, &ia->ia_addr.sin6_addr)) { |
| 1747 | IN6_IFADDR_RUNLOCK(&in6_ifa_tracker); |
| 1748 | return (1); |
| 1749 | } |
| 1750 | } |
| 1751 | IN6_IFADDR_RUNLOCK(&in6_ifa_tracker); |
| 1752 | return (0); |
| 1753 | } |
| 1754 | |
| 1755 | /* |
| 1756 | * Return 1 if an internet address is configured on an interface. |
no outgoing calls
no test coverage detected