Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177608008
D44632.1794830911.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
921 B
Referenced Files
None
Subscribers
None
D44632.1794830911.diff
View Options
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -764,6 +764,13 @@
so->so_fibnum = head->so_fibnum;
so->so_proto = head->so_proto;
so->so_cred = crhold(head->so_cred);
+ if (V_socket_hhh[HHOOK_SOCKET_NEWCONN]->hhh_nhooks > 0) {
+ if (hhook_run_socket(so, head, HHOOK_SOCKET_NEWCONN)) {
+ sodealloc(so);
+ log(LOG_DEBUG, "%s: hhook run failed\n", __func__);
+ return (NULL);
+ }
+ }
#ifdef MAC
mac_socket_newconn(head, so);
#endif
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -414,7 +414,8 @@
#define HHOOK_FILT_SOREAD 4
#define HHOOK_FILT_SOWRITE 5
#define HHOOK_SOCKET_CLOSE 6
-#define HHOOK_SOCKET_LAST HHOOK_SOCKET_CLOSE
+#define HHOOK_SOCKET_NEWCONN 7
+#define HHOOK_SOCKET_LAST HHOOK_SOCKET_NEWCONN
struct socket_hhook_data {
struct socket *so;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 12:08 PM (19 m, 10 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41744917
Default Alt Text
D44632.1794830911.diff (921 B)
Attached To
Mode
D44632: sockets: Add hhook in sonewconn for inheriting OSD specific data
Attached
Detach File
Event Timeline