Accepting request 98755 from home:seife:testing
- Add "vpnc: " prefix to stderr logmessages - change License field to GPL-2.0+ (bnc#731966) - update to rev 481 of nortel branch - better version of vpnc-ipid.diff upstream - various code cleanups - log to stdout instead of syslog in debug mode - fix pidfile writing (/var/run/vpnc does not necessarily exist) OBS-URL: https://build.opensuse.org/request/show/98755 OBS-URL: https://build.opensuse.org/package/show/network/vpnc?expand=0&rev=63
This commit is contained in:
parent
e28ffc3982
commit
c55752ef37
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:60ff3888d6144c149c48c4292d4eca3c8c97e0c68ace7653da763024c2c842b5
|
|
||||||
size 109881
|
|
3
vpnc-0.5.3r481.tar.bz2
Normal file
3
vpnc-0.5.3r481.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:993af40b1f8ae2bb2b0dcf86da09dbe124db770074ad7c6ac363f3084ff0fce3
|
||||||
|
size 109919
|
25
vpnc-add-name-to-stderr-log.diff
Normal file
25
vpnc-add-name-to-stderr-log.diff
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
Author: Stefan Seyfried <seife+obs@b1-sytems.com>
|
||||||
|
|
||||||
|
When called from e.g. NetworkManager, vpnc's stderr log messages
|
||||||
|
are redirected to logfiles where they are sometimes hard to spot,
|
||||||
|
e.g. they appear to be coming from NetworkManager itself.
|
||||||
|
|
||||||
|
Fix this by prepending "vpnc: " to them.
|
||||||
|
|
||||||
|
|
||||||
|
Index: b/config.c
|
||||||
|
===================================================================
|
||||||
|
--- a/config.c
|
||||||
|
+++ b/config.c
|
||||||
|
@@ -50,10 +50,11 @@ uint16_t opt_nortel_client_id;
|
||||||
|
|
||||||
|
static void log_to_stderr(int priority __attribute__((unused)), const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
+ fprintf(stderr, "vpnc: ");
|
||||||
|
va_start(ap, format);
|
||||||
|
vfprintf(stderr, format, ap);
|
||||||
|
fprintf(stderr, "\n");
|
||||||
|
va_end(ap);
|
||||||
|
}
|
@ -1,26 +0,0 @@
|
|||||||
From: Jan Engelhardt <jengelh@medozas.de>
|
|
||||||
Date: 2011-10-24 23:40:21.603981415 +0200
|
|
||||||
Upstream: tbd
|
|
||||||
|
|
||||||
vpnc-script: filter out more iproute2 fields
|
|
||||||
|
|
||||||
vpnc can throw an error message:
|
|
||||||
Error: either "to" is duplicate, or "ipid" is a garbage.
|
|
||||||
|
|
||||||
---
|
|
||||||
vpnc-script.in | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
Index: vpnc/vpnc-script.in
|
|
||||||
===================================================================
|
|
||||||
--- vpnc.orig/vpnc-script.in
|
|
||||||
+++ vpnc/vpnc-script.in
|
|
||||||
@@ -116,7 +116,7 @@ destroy_tun_device() {
|
|
||||||
|
|
||||||
if [ -n "$IPROUTE" ]; then
|
|
||||||
fix_ip_get_output () {
|
|
||||||
- sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g'
|
|
||||||
+ sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g;s/ipid \S\+//g;'
|
|
||||||
}
|
|
||||||
|
|
||||||
set_vpngateway_route() {
|
|
44
vpnc-pidfile-path.diff
Normal file
44
vpnc-pidfile-path.diff
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
Author: Stefan Seyfried <seife+obs@b1-systems.com>
|
||||||
|
Upstream: not yet
|
||||||
|
Subject: make pidfile writing work again
|
||||||
|
|
||||||
|
/var/run is cleared on every boot (tmpfs) and thus /var/run/vpnc
|
||||||
|
does not exist.
|
||||||
|
Just use /var/run/vpnc.pid instead, vpnc needs to run as root anyway,
|
||||||
|
so this should be fine.
|
||||||
|
|
||||||
|
vpnc-script is still using /var/run/vpnc for other stuff (resolv.conf
|
||||||
|
backup etc) but creates the directory on demand, so no harm is done
|
||||||
|
there.
|
||||||
|
|
||||||
|
Index: b/config.c
|
||||||
|
===================================================================
|
||||||
|
--- a/config.c
|
||||||
|
+++ b/config.c
|
||||||
|
@@ -182,11 +182,11 @@ static const char *config_def_script(voi
|
||||||
|
return "/etc/vpnc/vpnc-script";
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *config_def_pid_file(void)
|
||||||
|
{
|
||||||
|
- return "/var/run/vpnc/pid";
|
||||||
|
+ return "/var/run/vpnc.pid";
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *config_def_vendor(void)
|
||||||
|
{
|
||||||
|
return "cisco";
|
||||||
|
Index: b/vpnc-disconnect
|
||||||
|
===================================================================
|
||||||
|
--- a/vpnc-disconnect
|
||||||
|
+++ b/vpnc-disconnect
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
-pid=/var/run/vpnc/pid
|
||||||
|
+pid=/var/run/vpnc.pid
|
||||||
|
|
||||||
|
if [ $# -ne 0 ]; then
|
||||||
|
echo "Usage: $0" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -2,7 +2,7 @@ Index: b/tunip.c
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- a/tunip.c
|
--- a/tunip.c
|
||||||
+++ b/tunip.c
|
+++ b/tunip.c
|
||||||
@@ -884,10 +884,13 @@ static void vpnc_main_loop(struct sa_blo
|
@@ -882,10 +882,13 @@ static void vpnc_main_loop(struct sa_blo
|
||||||
time(NULL) - s->ipsec.life.start,
|
time(NULL) - s->ipsec.life.start,
|
||||||
s->ipsec.life.seconds,
|
s->ipsec.life.seconds,
|
||||||
s->ipsec.life.rx/1024,
|
s->ipsec.life.rx/1024,
|
||||||
@ -13,28 +13,28 @@ Index: b/tunip.c
|
|||||||
+ do_kill = -3;
|
+ do_kill = -3;
|
||||||
} while ((presult == 0 || (presult == -1 && errno == EINTR)) && !do_kill);
|
} while ((presult == 0 || (presult == -1 && errno == EINTR)) && !do_kill);
|
||||||
if (presult == -1) {
|
if (presult == -1) {
|
||||||
syslog(LOG_ERR, "select: %m");
|
logmsg(LOG_ERR, "select: %m");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -945,10 +948,13 @@ static void vpnc_main_loop(struct sa_blo
|
@@ -943,10 +946,13 @@ static void vpnc_main_loop(struct sa_blo
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (do_kill) {
|
switch (do_kill) {
|
||||||
+ case -3:
|
+ case -3:
|
||||||
+ syslog(LOG_NOTICE, "connection terminated by timeout -> restart");
|
+ logmsg(LOG_NOTICE, "connection terminated by timeout -> restart");
|
||||||
+ break;
|
+ break;
|
||||||
case -2:
|
case -2:
|
||||||
syslog(LOG_NOTICE, "connection terminated by dead peer detection");
|
logmsg(LOG_NOTICE, "connection terminated by dead peer detection");
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
syslog(LOG_NOTICE, "connection terminated by peer");
|
logmsg(LOG_NOTICE, "connection terminated by peer");
|
||||||
Index: b/vpnc.c
|
Index: b/vpnc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- a/vpnc.c
|
--- a/vpnc.c
|
||||||
+++ b/vpnc.c
|
+++ b/vpnc.c
|
||||||
@@ -3779,24 +3779,25 @@ int main(int argc, char **argv)
|
@@ -3777,24 +3777,25 @@ int main(int argc, char **argv)
|
||||||
#endif
|
#endif
|
||||||
gcry_check_version("1.1.90");
|
gcry_check_version("1.1.90");
|
||||||
gcry_control(GCRYCTL_INIT_SECMEM, 16384, 0);
|
gcry_control(GCRYCTL_INIT_SECMEM, 16384, 0);
|
||||||
@ -64,7 +64,7 @@ Index: b/vpnc.c
|
|||||||
init_sockaddr(&s->opt_src_ip, config[CONFIG_LOCAL_ADDR]);
|
init_sockaddr(&s->opt_src_ip, config[CONFIG_LOCAL_ADDR]);
|
||||||
DEBUGTOP(2, printf("S2 make_socket\n"));
|
DEBUGTOP(2, printf("S2 make_socket\n"));
|
||||||
s->ike.src_port = atoi(config[CONFIG_LOCAL_PORT]);
|
s->ike.src_port = atoi(config[CONFIG_LOCAL_PORT]);
|
||||||
@@ -3847,10 +3848,11 @@ int main(int argc, char **argv)
|
@@ -3845,10 +3846,11 @@ int main(int argc, char **argv)
|
||||||
close_tunnel(s);
|
close_tunnel(s);
|
||||||
|
|
||||||
/* Free resources */
|
/* Free resources */
|
||||||
|
23
vpnc.changes
23
vpnc.changes
@ -1,3 +1,26 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 4 12:00:03 UTC 2012 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
- Add "vpnc: " prefix to stderr logmessages
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jan 4 11:45:29 UTC 2012 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
- change License field to GPL-2.0+ (bnc#731966)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 28 15:41:32 UTC 2011 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
- update to rev 481 of nortel branch
|
||||||
|
- better version of vpnc-ipid.diff upstream
|
||||||
|
- various code cleanups
|
||||||
|
- log to stdout instead of syslog in debug mode
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 18 09:32:17 UTC 2011 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
- fix pidfile writing (/var/run/vpnc does not necessarily exist)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Nov 9 06:25:30 UTC 2011 - seife+obs@b1-systems.com
|
Wed Nov 9 06:25:30 UTC 2011 - seife+obs@b1-systems.com
|
||||||
|
|
||||||
|
23
vpnc.spec
23
vpnc.spec
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package vpnc
|
# spec file for package vpnc
|
||||||
#
|
#
|
||||||
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -15,17 +15,16 @@
|
|||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Name: vpnc
|
Name: vpnc
|
||||||
Group: Productivity/Networking/Security
|
BuildRequires: gnutls
|
||||||
BuildRequires: libgcrypt-devel
|
BuildRequires: libgcrypt-devel
|
||||||
BuildRequires: gnutls libgnutls-devel pkg-config
|
BuildRequires: libgnutls-devel
|
||||||
Version: 0.5.3r472
|
BuildRequires: pkg-config
|
||||||
Release: 13
|
Version: 0.5.3r481
|
||||||
License: BSD-3-Clause ; GPL-2.0+
|
Release: 0
|
||||||
AutoReqProv: on
|
|
||||||
Summary: A Client for Cisco VPN concentrator
|
Summary: A Client for Cisco VPN concentrator
|
||||||
|
License: GPL-2.0+
|
||||||
|
Group: Productivity/Networking/Security
|
||||||
Url: http://svn.unix-ag.uni-kl.de/vpnc/branches/vpnc-nortel
|
Url: http://svn.unix-ag.uni-kl.de/vpnc/branches/vpnc-nortel
|
||||||
Requires: /usr/bin/sed /sbin/ip
|
Requires: /usr/bin/sed /sbin/ip
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
@ -34,9 +33,10 @@ Source1: checkout_svn.sh
|
|||||||
Patch0: bugfix.diff
|
Patch0: bugfix.diff
|
||||||
Patch1: vpnc-no-build-dates.patch
|
Patch1: vpnc-no-build-dates.patch
|
||||||
Patch2: work-with-netconfig.patch
|
Patch2: work-with-netconfig.patch
|
||||||
Patch3: vpnc-ipid.diff
|
|
||||||
# most ugly hack ever
|
# most ugly hack ever
|
||||||
Patch4: vpnc-restart-after-timeout.diff
|
Patch4: vpnc-restart-after-timeout.diff
|
||||||
|
Patch5: vpnc-pidfile-path.diff
|
||||||
|
Patch6: vpnc-add-name-to-stderr-log.diff
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -65,8 +65,9 @@ Authors:
|
|||||||
%patch1
|
%patch1
|
||||||
#Patch is not yet working :-(
|
#Patch is not yet working :-(
|
||||||
#patch2 -p0
|
#patch2 -p0
|
||||||
%patch -P 3 -p1
|
|
||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
|
%patch5 -p1
|
||||||
|
%patch6 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%optflags"
|
export CFLAGS="%optflags"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user