diff options
Diffstat (limited to 'sys/kern/sys_socket.c')
| -rw-r--r-- | sys/kern/sys_socket.c | 21 | 
1 files changed, 12 insertions, 9 deletions
| diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 441a628b7f78..a30260bfeebc 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -346,14 +346,15 @@ soo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)  	kif->kf_type = KF_TYPE_SOCKET;  	so = fp->f_data; -	kif->kf_sock_domain = so->so_proto->pr_domain->dom_family; -	kif->kf_sock_type = so->so_type; -	kif->kf_sock_protocol = so->so_proto->pr_protocol; +	kif->kf_un.kf_sock.kf_sock_domain0 = +	    so->so_proto->pr_domain->dom_family; +	kif->kf_un.kf_sock.kf_sock_type0 = so->so_type; +	kif->kf_un.kf_sock.kf_sock_protocol0 = so->so_proto->pr_protocol;  	kif->kf_un.kf_sock.kf_sock_pcb = (uintptr_t)so->so_pcb; -	switch (kif->kf_sock_domain) { +	switch (kif->kf_un.kf_sock.kf_sock_domain0) {  	case AF_INET:  	case AF_INET6: -		if (kif->kf_sock_protocol == IPPROTO_TCP) { +		if (kif->kf_un.kf_sock.kf_sock_protocol0 == IPPROTO_TCP) {  			if (so->so_pcb != NULL) {  				inpcb = (struct inpcb *)(so->so_pcb);  				kif->kf_un.kf_sock.kf_sock_inpcb = @@ -376,13 +377,15 @@ soo_fill_kinfo(struct file *fp, struct kinfo_file *kif, struct filedesc *fdp)  		break;  	}  	error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa); -	if (error == 0 && sa->sa_len <= sizeof(kif->kf_sa_local)) { -		bcopy(sa, &kif->kf_sa_local, sa->sa_len); +	if (error == 0 && +	    sa->sa_len <= sizeof(kif->kf_un.kf_sock.kf_sa_local)) { +		bcopy(sa, &kif->kf_un.kf_sock.kf_sa_local, sa->sa_len);  		free(sa, M_SONAME);  	}  	error = so->so_proto->pr_usrreqs->pru_peeraddr(so, &sa); -	if (error == 0 && sa->sa_len <= sizeof(kif->kf_sa_peer)) { -		bcopy(sa, &kif->kf_sa_peer, sa->sa_len); +	if (error == 0 && +	    sa->sa_len <= sizeof(kif->kf_un.kf_sock.kf_sa_peer)) { +		bcopy(sa, &kif->kf_un.kf_sock.kf_sa_peer, sa->sa_len);  		free(sa, M_SONAME);  	}  	strncpy(kif->kf_path, so->so_proto->pr_domain->dom_name, | 
