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 56026bdd..3440ed63 100644
--- a/sysdep/bsd/krt-sock.c
+++ b/sysdep/bsd/krt-sock.c
@@ -946,6 +946,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)
{
@@ -967,6 +973,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;