applied patch to address infinite loop
This commit is contained in:
parent
0c8c0572d0
commit
b795c451c6
23
ocserv-0.11.10-fix-loop.patch
Normal file
23
ocserv-0.11.10-fix-loop.patch
Normal file
@ -0,0 +1,23 @@
|
||||
diff --git a/src/worker-vpn.c b/src/worker-vpn.c
|
||||
index 730d7d2b..f1585a44 100644
|
||||
--- a/src/worker-vpn.c
|
||||
+++ b/src/worker-vpn.c
|
||||
@@ -2158,11 +2158,17 @@ static int connect_handler(worker_st * ws)
|
||||
sigprocmask(SIG_BLOCK, &blockset, NULL);
|
||||
#endif
|
||||
if (ret == -1) {
|
||||
- if (errno == EINTR)
|
||||
+ if (errno == EINTR || EAGAIN)
|
||||
continue;
|
||||
terminate_reason = REASON_ERROR;
|
||||
goto exit;
|
||||
}
|
||||
+
|
||||
+ if ((pfd[0].revents | pfd[1].revents |
|
||||
+ pfd[2].revents | pfd[3].revents) & POLLERR) {
|
||||
+ terminate_reason = REASON_ERROR;
|
||||
+ goto exit;
|
||||
+ }
|
||||
}
|
||||
gettime(&tnow);
|
||||
|
@ -1,6 +1,6 @@
|
||||
# This spec file has been automatically updated
|
||||
Version: 0.11.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
%global _hardened_build 1
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
@ -42,6 +42,7 @@ Source8: ocserv-genkey
|
||||
Source9: ocserv-script
|
||||
Source10: gpgkey-56EE7FA9E8173B19FE86268D763712747F343FA7.gpg
|
||||
Source11: ocserv.init
|
||||
Patch0: ocserv-0.11.10-fix-loop.patch
|
||||
|
||||
# Taken from upstream:
|
||||
# http://git.infradead.org/ocserv.git/commitdiff/7d70006a2dbddf783213f1856374bacc74217e09
|
||||
@ -125,6 +126,7 @@ to provide the secure VPN service.
|
||||
gpgv2 --keyring %{SOURCE2} %{SOURCE1} %{SOURCE0} || gpgv2 --keyring %{SOURCE10} %{SOURCE1} %{SOURCE0}
|
||||
%endif
|
||||
%setup -q
|
||||
%patch0 -p1 -b .infinite-loop
|
||||
|
||||
rm -f src/http-parser/http_parser.c src/http-parser/http_parser.h
|
||||
%if (0%{?use_local_protobuf} == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user