* See whether new ifa is better than current one: * 1) A non-virtual one is preferred over virtual. * 2) A virtual in master state preferred over any other state. * * Used in several address selecting functions. */
| 2148 | * Used in several address selecting functions. |
| 2149 | */ |
| 2150 | int |
| 2151 | ifa_preferred(struct ifaddr *cur, struct ifaddr *next) |
| 2152 | { |
| 2153 | |
| 2154 | return (cur->ifa_carp && (!next->ifa_carp || |
| 2155 | ((*carp_master_p)(next) && !(*carp_master_p)(cur)))); |
| 2156 | } |
| 2157 | |
| 2158 | struct sockaddr_dl * |
| 2159 | link_alloc_sdl(size_t size, int flags) |
no outgoing calls
no test coverage detected