On 17.04.2015 14:57, Gleb Smirnoff wrote:
> Author: glebius
> Date: Fri Apr 17 11:57:06 2015
> New Revision: 281649
> URL: https://svnweb.freebsd.org/changeset/base/281649
> 
> Log:
>   Provide functions to determine presence of a given address
>   configured on a given interface.
>   
> +/*
> + * Return 1 if an internet address is configured on an interface.
> + */
> +int
> +in6_ifhasaddr(struct ifnet *ifp, struct in6_addr *addr)
> +{
> +     struct in6_addr in6;
> +     struct ifaddr *ifa;
> +     struct in6_ifaddr *ia6;
> +
> +     in6 = *addr;
> +     if (in6_clearscope(&in6) || in6_clearscope(&in6))

Why do you call in6_clearscope() twice? Just to be sure? :)

-- 
WBR, Andrey V. Elsukov

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to