summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2021-02-20 16:25:05 +0000
committerRoy Marples <roy@marples.name>2021-02-20 16:25:05 +0000
commita75ffaa08d3e540df8648c253028337342dabe09 (patch)
tree9fb33a72c809d7ba4b612c0f0caafc095ff87ecc
parentf322b5a1ae427c3f8be08448564ee5b1b5ef6683 (diff)
downloaddhcpcd-master.tar.xz
control: Cannot write with hangupHEADmaster
-rw-r--r--src/control.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/control.c b/src/control.c
index 6eb42d13..13602914 100644
--- a/src/control.c
+++ b/src/control.c
@@ -193,11 +193,10 @@ control_handle_data(void *arg, unsigned short events)
{
struct fd_list *fd = arg;
- if (events != ELE_READ && events != ELE_WRITE &&
- events != (ELE_READ | ELE_WRITE))
+ if (!(events & (ELE_READ | ELE_WRITE)))
logerrx("%s: unexpected event 0x%04x", __func__, events);
- if (events & ELE_WRITE)
+ if (events & ELE_WRITE && !(events & ELE_HANGUP))
control_handle_write(fd);
if (events & ELE_READ)
control_handle_read(fd);