Mike Belopuhov:
> > 454 if (ln && ln->ln_hold) {
> > 455 hip6 = mtod(ln->ln_hold, struct ip6_hdr *);
> > 456 /* XXX pullup? */
> > 457 if (sizeof(*hip6) < ln->ln_hold->m_len)
> > 458 saddr6 = &hip6->ip6_src;
> > 459 else
> > 460 saddr6 = NULL;
> > 461 } else
> > 462 saddr6 = NULL;
>
> Does reversing this condition work? (sizeof > m_len)
That doesn't make sense, is effectively an if(0), and turns the
whole snippet into saddr6 = NULL. But yes, for testing purposes
that fixes the problem.
> FreeBSD has moved this code into nd6_llinfo_get_holdsrc and
> fixed this condition in this diff:
> https://svnweb.freebsd.org/base?view=revision&revision=288652
But the way I understand the FreeBSD code it is equivalent to
if (sizeof(*hip6) > ln->ln_hold->m_len)
saddr6 = NULL;
else
saddr6 = &hip6->ip6_src;
and thus corresponds to our "not working" case.
--
Christian "naddy" Weisgerber [email protected]