]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Ensure that the vnet is set when calling pru_sockaddr() and
authorMichael Tuexen <tuexen@FreeBSD.org>
Thu, 11 Jan 2018 20:26:17 +0000 (20:26 +0000)
committerMichael Tuexen <tuexen@FreeBSD.org>
Thu, 11 Jan 2018 20:26:17 +0000 (20:26 +0000)
commitce076a1f58946e5f1c882e80cdd3091d01510329
tree8004f4d19bd13c61ae8cd64d876d1dc4bdbc4c08
parent1b65356b437a8752a56647fdea417b8db20e6e20
Ensure that the vnet is set when calling pru_sockaddr() and
pru_peeraddr().

This is already true when called via kern_getsockname() and
kern_getpeername(). This patch sets it also, when they arecalled
via soo_fill_kinfo(). This is necessary, since the corresponding
functions for SCTP require the vnet to be set. Without this,
if a process having an wildcard bound SCTP socket is
terminated and a core is written, the kernel panics.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D13652
sys/kern/sys_socket.c