Fix hostname to be returned in an ICMPv6 NI Reply message defined in RFC 4620, ICMPv6 Node Information Queries. A vnet jail with an IPv6 address sent a hostname of the host environment, not the jail, even if another hostname was set to the jail.
This patch looks for a struct prison for the jail from the allprison list every time when an NI Query message arrives on an interface by using the ifp->if_vnet. Any suggestions of a more efficient way are welcome.
Note that this patch includes a change to narrow a pr->pr_mtx lock. It is not related to the fix above while there is no functionality change.