diff options
| author | 2014-07-11 16:43:33 +0000 | |
|---|---|---|
| committer | 2014-07-11 16:43:33 +0000 | |
| commit | 9a23296289b2bcf3d31d8be94e90e75b7357fe84 (patch) | |
| tree | 3f82aaf21faea35483ca1bcce4dd0b342e921f1f /usr.sbin/ripd/control.c | |
| parent | net.inet6.ip6.accept_rtadv bit the bucket (diff) | |
| download | wireguard-openbsd-9a23296289b2bcf3d31d8be94e90e75b7357fe84.tar.xz wireguard-openbsd-9a23296289b2bcf3d31d8be94e90e75b7357fe84.zip | |
Close the control fd when it has reported EOF.
ok henning@
Diffstat (limited to 'usr.sbin/ripd/control.c')
| -rw-r--r-- | usr.sbin/ripd/control.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ripd/control.c b/usr.sbin/ripd/control.c index 73a80851057..2a6f6aa4f9d 100644 --- a/usr.sbin/ripd/control.c +++ b/usr.sbin/ripd/control.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control.c,v 1.19 2013/11/19 22:25:32 benno Exp $ */ +/* $OpenBSD: control.c,v 1.20 2014/07/11 16:43:33 krw Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -228,7 +228,7 @@ control_dispatch_imsg(int fd, short event, void *bula) } } if (event & EV_WRITE) { - if (msgbuf_write(&c->iev.ibuf.w) == -1 && errno != EAGAIN) { + if (msgbuf_write(&c->iev.ibuf.w) <= 0 && errno != EAGAIN) { control_close(fd); return; } |
