diff options
author | Hans Dedecker <dedeckeh@gmail.com> | 2017-02-10 10:57:34 +0100 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-02-10 11:02:31 +0100 |
commit | fa57225cb62b43adffc37a50c3dbd3fa7d225b0b (patch) | |
tree | 56485c14539f8aefe5cc6cc6710473f8baaffb16 /src/ndp.c | |
parent | ac70d28ed6ec96e6911cdf56b903f5c5ee3e67c5 (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.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); } |