]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Arm inotify only in server mode
authorLev Stipakov <lstipakov@gmail.com>
Tue, 6 Dec 2016 23:45:51 +0000 (01:45 +0200)
committerDavid Sommerseth <davids@openvpn.net>
Wed, 7 Dec 2016 03:11:42 +0000 (04:11 +0100)
Async-push is a server side feature and inotify_fd is
initialized in server mode.

Trac: #786
Signed-off-by: Lev Stipakov <lstipakov@gmail.com>
Acked-by: David Sommerseth <davids@openvpn.net>
Message-Id: <1481067951-28917-1-git-send-email-lstipakov@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13415.html
Signed-off-by: David Sommerseth <davids@openvpn.net>
src/openvpn/forward.c

index b50a2e0257716edb366b50945416bbdf7ff1bf8d..4502e10127c0143386af76f41f1869cb318d404a 100644 (file)
@@ -1578,7 +1578,8 @@ io_wait_dowork (struct context *c, const unsigned int flags)
 
 #ifdef ENABLE_ASYNC_PUSH
   /* arm inotify watcher */
-  event_ctl (c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void*)&file_shift);
+  if (c->options.mode == MODE_SERVER)
+    event_ctl (c->c2.event_set, c->c2.inotify_fd, EVENT_READ, (void*)&file_shift);
 #endif
 
   /*