summaryrefslogtreecommitdiffhomepage
path: root/src/ndp.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-02-10 10:57:34 +0100
committerHans Dedecker <dedeckeh@gmail.com>2017-02-10 11:02:31 +0100
commitfa57225cb62b43adffc37a50c3dbd3fa7d225b0b (patch)
tree56485c14539f8aefe5cc6cc6710473f8baaffb16 /src/ndp.c
parentac70d28ed6ec96e6911cdf56b903f5c5ee3e67c5 (diff)
ndp: deregister netlink event socket for non recoverable errors
Deregister netlink event socket in case of error different from ENOBUFS or failure to set netlink rx buffer size Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'src/ndp.c')
-rw-r--r--src/ndp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ndp.c b/src/ndp.c
index c6e4eda..427547d 100644
--- a/src/ndp.c
+++ b/src/ndp.c
@@ -539,13 +539,17 @@ static void catch_rtnl_err(struct odhcpd_event *e, int error)
struct event_socket *ev_sock = container_of(e, struct event_socket, ev);
if (error != ENOBUFS)
- return;
+ goto err;
/* Double netlink event buffer size */
ev_sock->sock_bufsize *= 2;
if (nl_socket_set_buffer_size(ev_sock->sock, ev_sock->sock_bufsize, 0))
- return;
+ goto err;
dump_addr_table();
+ return;
+
+err:
+ odhcpd_deregister(e);
}