> If you don't explicitly bind a preferred address to use (most > applications do not), then the kernel will choose an address for you. > With UDP, this happens on a packet-by-packet basis.
Really? I'd expect the first packet to a given destination to construct an IRE cache entry, and then for future packets to go through the fastpath in udp_send_data(), which will then set the source address consistently from ire_src_addr: if (src == INADDR_ANY && !connp->conn_unspec_src) { if (CLASSD(dst) && !(ire->ire_flags & RTF_SETSRC)) ipha->ipha_src = ipif->ipif_src_addr; else --> ipha->ipha_src = ire->ire_src_addr; } if (ipif != NULL) ipif_refrele(ipif); udp_xmit(connp->conn_wq, mp, ire, connp, connp->conn_zoneid); Of course, the IRE will have IRE_MARK_TEMPORARY set, so the IRE may not last *all* that long, but source address selection shouldn't occur on a packet-by-packet basis. -- meem _______________________________________________ zones-discuss mailing list zones-discuss@opensolaris.org