summaryrefslogtreecommitdiff
path: root/sysdep/bsd
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep/bsd')
-rw-r--r--sysdep/bsd/krt-sock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sysdep/bsd/krt-sock.c b/sysdep/bsd/krt-sock.c
index 6ff3b2b7..f2ae81c3 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -911,6 +911,12 @@ krt_sock_hook(sock *sk, int size UNUSED)
return 0;
}
+static void
+krt_sock_err_hook(sock *sk, int e UNUSED)
+{
+ krt_sock_hook(sk, 0);
+}
+
static sock *
krt_sock_open(pool *pool, void *data, int table_id)
{
@@ -932,6 +938,7 @@ krt_sock_open(pool *pool, void *data, int table_id)
sk = sk_new(pool);
sk->type = SK_MAGIC;
sk->rx_hook = krt_sock_hook;
+ sk->err_hook = krt_sock_err_hook;
sk->fd = fd;
sk->data = data;