On Tue, Jul 04, 2017 at 09:15:49AM +0000, Florian Obser wrote:
> Comments, OKs?
> 

s/saddr6 musst/saddr6 must/

then ok

> diff --git nd6_nbr.c nd6_nbr.c
> index fa8d3ed1472..086eeef87ba 100644
> --- nd6_nbr.c
> +++ nd6_nbr.c
> @@ -445,7 +445,8 @@ nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6,
>                * We use the source address for the prompting packet
>                * (saddr6), if:
>                * - saddr6 is given from the caller (by giving "ln"), and
> -              * - saddr6 belongs to the outgoing interface.
> +              * - saddr6 belongs to the outgoing interface and
> +              * - if taddr is link local saddr6 musst be link local as well
>                * Otherwise, we perform the source address selection as usual.
>                */
>               struct ip6_hdr *hip6;           /* hold ip6 */
> @@ -453,9 +454,12 @@ nd6_ns_output(struct ifnet *ifp, struct in6_addr *daddr6,
>  
>               if (ln && ln->ln_hold) {
>                       hip6 = mtod(ln->ln_hold, struct ip6_hdr *);
> -                     if (sizeof(*hip6) <= ln->ln_hold->m_len)
> +                     if (sizeof(*hip6) <= ln->ln_hold->m_len) {
>                               saddr6 = &hip6->ip6_src;
> -                     else
> +                             if (saddr6 && IN6_IS_ADDR_LINKLOCAL(taddr6) &&
> +                                 !IN6_IS_ADDR_LINKLOCAL(saddr6))
> +                                     saddr6 = NULL;
> +                     } else
>                               saddr6 = NULL;
>               } else
>                       saddr6 = NULL;
> 
> -- 
> I'm not entirely sure you are real.
> 

Reply via email to