Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
721d8ef88a |
2 changed files with 53 additions and 2 deletions
33
vtun-client-sighup.patch
Normal file
33
vtun-client-sighup.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
When sending a SIGHUP to a vtun client process which is unable to connect
|
||||
to the remote server, it will attempt to reconnect without sleeping between
|
||||
consecutive attempts. This results in a CPU usage spike, and a flood of
|
||||
data sent to syslog.
|
||||
This patch causes the first sleep after SIGHUP to be discarded, then allows
|
||||
sleep to be used again in subsequent iterations.
|
||||
diff -NarU5 a/client.c b/client.c
|
||||
--- a/client.c 2012-07-08 01:32:57.000000000 -0400
|
||||
+++ b/client.c 2016-03-21 17:17:34.111775616 -0400
|
||||
@@ -131,10 +131,11 @@
|
||||
|
||||
if( connect_t(s,(struct sockaddr *) &svr_addr, host->timeout) ){
|
||||
if (!vtun.quiet || errno != ETIMEDOUT)
|
||||
vtun_syslog(LOG_INFO,"Connect to %s failed. %s(%d)", vtun.svr_name,
|
||||
strerror(errno), errno);
|
||||
+ client_term = 0;
|
||||
} else {
|
||||
if( auth_client(s, host) ){
|
||||
vtun_syslog(LOG_INFO,"Session %s[%s] opened",host->host,vtun.svr_name);
|
||||
|
||||
host->rmt_fd = s;
|
||||
@@ -143,10 +144,11 @@
|
||||
client_term = tunnel(host);
|
||||
|
||||
vtun_syslog(LOG_INFO,"Session %s[%s] closed",host->host,vtun.svr_name);
|
||||
} else {
|
||||
vtun_syslog(LOG_INFO,"Connection denied by %s",vtun.svr_name);
|
||||
+ client_term = 0;
|
||||
}
|
||||
}
|
||||
close(s);
|
||||
free_sopt(&host->sopt);
|
||||
}
|
||||
22
vtun.spec
22
vtun.spec
|
|
@ -1,6 +1,6 @@
|
|||
Name: vtun
|
||||
Version: 3.0.3
|
||||
Release: 11%{?dist}
|
||||
Release: 15%{?dist}
|
||||
Summary: Virtual tunnel over TCP/IP networks
|
||||
License: GPLv2+
|
||||
Group: System Environment/Daemons
|
||||
|
|
@ -10,6 +10,7 @@ Source1: vtun.socket
|
|||
Source2: vtun.service
|
||||
Source3: vtun.sysconfig
|
||||
Patch0: vtun-nostrip.patch
|
||||
Patch1: vtun-client-sighup.patch
|
||||
|
||||
Requires(post): systemd-units
|
||||
Requires(preun): systemd-units
|
||||
|
|
@ -32,10 +33,14 @@ require modification to any kernel parts.
|
|||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%{__autoconf}
|
||||
%configure
|
||||
# FIXME: Package suffers from c11/inline issues.
|
||||
# Workaround by appending --std=gnu89 to CFLAGS
|
||||
# Proper fix would be to fix the source-code
|
||||
%configure CFLAGS="${RPM_OPT_FLAGS} --std=gnu89"
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
|
|
@ -68,6 +73,19 @@ make install DESTDIR=%{buildroot} INSTALL_OWNER= INSTALL="/usr/bin/install -p"
|
|||
%{_mandir}/man8/vtund.8*
|
||||
|
||||
%changelog
|
||||
* Mon Mar 21 2016 Gabriel Somlo <somlo at cmu.edu> 3.0.3-15
|
||||
- patch to fix #1319858,#1319859,#1319861
|
||||
|
||||
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.3-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||
|
||||
* Mon Jun 22 2015 Ralf Corsépius <corsepiu@fedoraproject.org> - 3.0.3-13
|
||||
- Append --stdc=gnu89 to CFLAGS (Work-around to c11/inline compatibility
|
||||
issues. Fix FTBFS).
|
||||
|
||||
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.3-12
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||
|
||||
* Tue Dec 23 2014 Gabriel Somlo <somlo at cmu.edu> 3.0.3-11
|
||||
- enhanced service file (remove "KillMode", use default "cgroup" mode)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue