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/odhcpd.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/odhcpd.c')
-rw-r--r-- | src/odhcpd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/odhcpd.c b/src/odhcpd.c index 2b0ea98..ed96178 100644 --- a/src/odhcpd.c +++ b/src/odhcpd.c @@ -566,6 +566,12 @@ int odhcpd_register(struct odhcpd_event *event) ((event->handle_error) ? ULOOP_ERROR_CB : 0)); } +int odhcpd_deregister(struct odhcpd_event *event) +{ + event->uloop.cb = NULL; + return uloop_fd_delete(&event->uloop); +} + void odhcpd_process(struct odhcpd_event *event) { odhcpd_receive_packets(&event->uloop, 0); |