1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Kernel socket missing err_hook fix

Thanks to Tim Weippert for bugreport.
This commit is contained in:
Jan Moskyto Matejka
2016-09-29 12:00:53 +02:00
parent 79e2293ab2
commit ccd2a3eda2
3 changed files with 15 additions and 1 deletions

View File

@@ -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;