Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178224445
D17262.1796281295.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D17262.1796281295.diff
View Options
Index: lib/libprocstat/libprocstat.c
===================================================================
--- lib/libprocstat/libprocstat.c
+++ lib/libprocstat/libprocstat.c
@@ -1558,10 +1558,8 @@
sock->dom_family = kif->kf_sock_domain;
sock->so_pcb = kif->kf_un.kf_sock.kf_sock_pcb;
strlcpy(sock->dname, kif->kf_path, sizeof(sock->dname));
- bcopy(&kif->kf_un.kf_sock.kf_sa_local, &sock->sa_local,
- kif->kf_un.kf_sock.kf_sa_local.ss_len);
- bcopy(&kif->kf_un.kf_sock.kf_sa_peer, &sock->sa_peer,
- kif->kf_un.kf_sock.kf_sa_peer.ss_len);
+ bcopy(&kif->kf_sa_local, &sock->sa_local, kif->kf_sa_local.ss_len);
+ bcopy(&kif->kf_sa_peer, &sock->sa_peer, kif->kf_sa_peer.ss_len);
/*
* Protocol specific data.
Index: sys/kern/sys_socket.c
===================================================================
--- sys/kern/sys_socket.c
+++ sys/kern/sys_socket.c
@@ -396,14 +396,14 @@
}
error = so->so_proto->pr_usrreqs->pru_sockaddr(so, &sa);
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);
+ sa->sa_len <= sizeof(kif->kf_un.kf_sock.kf_sa_local0)) {
+ bcopy(sa, &kif->kf_un.kf_sock.kf_sa_local0, 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_un.kf_sock.kf_sa_peer)) {
- bcopy(sa, &kif->kf_un.kf_sock.kf_sa_peer, sa->sa_len);
+ sa->sa_len <= sizeof(kif->kf_un.kf_sock.kf_sa_peer0)) {
+ bcopy(sa, &kif->kf_un.kf_sock.kf_sa_peer0, sa->sa_len);
free(sa, M_SONAME);
}
strncpy(kif->kf_path, so->so_proto->pr_domain->dom_name,
Index: sys/sys/user.h
===================================================================
--- sys/sys/user.h
+++ sys/sys/user.h
@@ -355,9 +355,9 @@
/* Socket protocol. */
int kf_sock_protocol0;
/* Socket address. */
- struct sockaddr_storage kf_sa_local;
+ struct sockaddr_storage kf_sa_local0;
/* Peer address. */
- struct sockaddr_storage kf_sa_peer;
+ struct sockaddr_storage kf_sa_peer0;
/* Address of so_pcb. */
uint64_t kf_sock_pcb;
/* Address of inp_ppcb. */
@@ -438,6 +438,8 @@
#define kf_sock_domain kf_un.kf_sock.kf_sock_domain0
#define kf_sock_type kf_un.kf_sock.kf_sock_type0
#define kf_sock_protocol kf_un.kf_sock.kf_sock_protocol0
+#define kf_sa_local kf_un.kf_sock.kf_sa_local0
+#define kf_sa_peer kf_un.kf_sock.kf_sa_peer0
#endif
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 3, 7:01 AM (17 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42174733
Default Alt Text
D17262.1796281295.diff (2 KB)
Attached To
Mode
D17262: Restore the API of the kf_sa_local and kf_sa_peer members.
Attached
Detach File
Event Timeline