> Is there a webrev that I need to look at?
There was, but it got clobbered by a webrev for another change. You can
find the changes in the Clearview IPMP gate, if you're really interested
;-)
> BTW, a question about nce_xmit:
>
> 2274 if (!IN6_IS_ADDR_UNSPECIFIED(sender) && type !=
> ND_NEIGHBOR_ADVERT) {
> 2275 if ((ipif = ip_ndp_lookup_addr_v6(sender, ill)) ==
> NULL)
> :
> 2279 }
> :
> 2295 if (IN6_IS_ADDR_UNSPECIFIED(sender) && !(flag & NDP_PROBE)) {
> :
> 2313 } else if (!(IN6_IS_ADDR_UNSPECIFIED(sender))) {
> 2314 if ((src_ipif = ip_ndp_lookup_addr_v6(sender, ill)) ==
> NULL ||
> :
>
> So for NA's we end up doing the ip_ndp_lookup_addr_v6() at line 2314
> anyway, and for other packets (e.g., NS with !unspec sender) we would
> end up doing the lookup twice. Why can't we just do one lookup at
> line 2275 and track the ipif, since we need it for the zoneid for the
> NA anyway?
I can do this if you prefer:
/*
* Check that the sender is actually a usable address on `ill', and if
* so, track that as the src_ipif. If not, for solicitations, set the
* sender to :: so that a new one will be picked below; for adverts,
* drop the packet since we expect nce_xmit_advert() to always provide
* a valid sender.
*/
if (!IN6_IS_ADDR_UNSPECIFIED(sender)) {
if ((src_ipif = ip_ndp_lookup_addr_v6(sender, ill)) == NULL ||
!src_ipif->ipif_addr_ready) {
if (src_ipif != NULL)
ipif_refrele(src_ipif);
if (type == ND_NEIGHBOR_ADVERT) {
ip1dbg(("nce_xmit: No source ipif for src
%s\n",
inet_ntop(AF_INET6, sender, buf,
sizeof (buf))));
return (B_TRUE);
}
sender = &ipv6_all_zeros;
}
}
/*
* If we still have an unspecified source (sender) address and this
* isn't a probe, select a source address from `ill'.
*/
if (IN6_IS_ADDR_UNSPECIFIED(sender) && !(flag & NDP_PROBE)) {
ASSERT(type != ND_NEIGHBOR_ADVERT);
/*
* Pick a source address for this solicitation, but
* restrict the selection to addresses assigned to the
* output interface. We do this because the destination will
* create a neighbor cache entry for the source address of
* this packet, so the source address had better be a valid
* neighbor.
*/
src_ipif = ipif_select_source_v6(ill, target, B_TRUE,
IPV6_PREFER_SRC_DEFAULT, ALL_ZONES);
if (src_ipif == NULL) {
ip1dbg(("nce_xmit: No source ipif for dst %s\n",
inet_ntop(AF_INET6, target, buf, sizeof (buf))));
return (B_TRUE);
}
sender = &src_ipif->ipif_v6src_addr;
}
--
meem