From: git@ipfire.org
To: ipfire-scm@lists.ipfire.org
Subject: [git.ipfire.org] IPFire 2.x development tree branch, next, updated. b0a014b7f83f160c036d8910e90d1262321e2d12
Date: Tue, 05 Jan 2016 22:05:27 +0100 [thread overview]
Message-ID: <20160105210528.667012120C@argus.ipfire.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 9927 bytes --]
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "IPFire 2.x development tree".
The branch, next has been updated
via b0a014b7f83f160c036d8910e90d1262321e2d12 (commit)
via 9a09d94ee3eb6097897f31dc236dc0c2aaea677b (commit)
via 84032d0845148505c230db0f391e524146835a9c (commit)
via 964700d414ca841ca0d3e98329c179b4cb62e36e (commit)
from 9977da131b2d2e560057b79db714a987977026b4 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit b0a014b7f83f160c036d8910e90d1262321e2d12
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Tue Jan 5 21:00:19 2016 +0000
QoS: Improve saving enabled/disable state
It was reported that the QoS did not stop when
the user clicked the "stop" button. This patch
fixes that.
Fixes #10664
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
Acked-by: Arne Fitzenreiter <arne.fitzenreiter(a)ipfire.org>
commit 9a09d94ee3eb6097897f31dc236dc0c2aaea677b
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Tue Jan 5 20:44:26 2016 +0000
qosctrl: Cleanup code by replacing hardcoded paths
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 84032d0845148505c230db0f391e524146835a9c
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Mon Jan 4 22:46:13 2016 +0000
core97: Ship updated openvpn package
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit 964700d414ca841ca0d3e98329c179b4cb62e36e
Author: Erik Kapfer <erik.kapfer(a)ipfire.org>
Date: Tue Jul 7 13:13:35 2015 +0200
openvpn: Update to version 2.3.7, added --verify-x509-name directive.
The tls-remote directive is deprecated and will be removed with
OpenVPN version 2.4 . Added instead --verify-x509-name HOST name
into ovpnmain.cgi.
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
-----------------------------------------------------------------------
Summary of changes:
config/rootfiles/core/97/filelists/files | 3 ++
.../{oldcore/87 => core/97}/filelists/openvpn | 0
config/rootfiles/core/97/update.sh | 3 ++
html/cgi-bin/ovpnmain.cgi | 2 +-
html/cgi-bin/qos.cgi | 9 ++---
lfs/openvpn | 6 ++--
src/misc-progs/qosctrl.c | 42 ++++++++++++++++------
7 files changed, 45 insertions(+), 20 deletions(-)
copy config/rootfiles/{oldcore/87 => core/97}/filelists/openvpn (100%)
Difference in files:
diff --git a/config/rootfiles/core/97/filelists/files b/config/rootfiles/core/97/filelists/files
index 643ab97..22fc4f0 100644
--- a/config/rootfiles/core/97/filelists/files
+++ b/config/rootfiles/core/97/filelists/files
@@ -1,3 +1,6 @@
etc/system-release
etc/issue
+srv/web/ipfire/cgi-bin/ovpnmain.cgi
+srv/web/ipfire/cgi-bin/qos.cgi
usr/bin/pgrep
+usr/local/bin/qosctrl
diff --git a/config/rootfiles/core/97/filelists/openvpn b/config/rootfiles/core/97/filelists/openvpn
new file mode 120000
index 0000000..493f3f7
--- /dev/null
+++ b/config/rootfiles/core/97/filelists/openvpn
@@ -0,0 +1 @@
+../../../common/openvpn
\ No newline at end of file
diff --git a/config/rootfiles/core/97/update.sh b/config/rootfiles/core/97/update.sh
index e6d4f21..85131da 100644
--- a/config/rootfiles/core/97/update.sh
+++ b/config/rootfiles/core/97/update.sh
@@ -43,6 +43,9 @@ extract_files
# Start services
/etc/init.d/dnsmasq start
+# Delete old QoS enabled indicator
+rm -f /var/ipfire/qos/enable
+
# This update need a reboot...
#touch /var/run/need_reboot
diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi
index 62af54e..037894d 100644
--- a/html/cgi-bin/ovpnmain.cgi
+++ b/html/cgi-bin/ovpnmain.cgi
@@ -2333,7 +2333,7 @@ else
}
print CLIENTCONF "verb 3\r\n";
print CLIENTCONF "ns-cert-type server\r\n";
- print CLIENTCONF "tls-remote $vpnsettings{ROOTCERT_HOSTNAME}\r\n";
+ print CLIENTCONF "verify-x509-name $vpnsettings{ROOTCERT_HOSTNAME} name\r\n";
if ($vpnsettings{MSSFIX} eq 'on') {
print CLIENTCONF "mssfix\r\n";
}
diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi
index 39c3ed8..590ad15 100644
--- a/html/cgi-bin/qos.cgi
+++ b/html/cgi-bin/qos.cgi
@@ -463,18 +463,16 @@ if ($qossettings{'ACTION'} eq $Lang::tr{'start'})
$qossettings{'ENABLED'} = 'on';
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
- system("/usr/bin/touch /var/ipfire/qos/enable");
system("/usr/local/bin/qosctrl start >/dev/null 2>&1");
system("logger -t ipfire 'QoS started'");
}
elsif ($qossettings{'ACTION'} eq $Lang::tr{'stop'})
{
- system("/usr/local/bin/qosctrl stop >/dev/null 2>&1");
- unlink "/var/ipfire/qos/bin/qos.sh";
- unlink "/var/ipfire/qos/enable";
- system("logger -t ipfire 'QoS stopped'");
$qossettings{'ENABLED'} = 'off';
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
+ system("/usr/local/bin/qosctrl stop >/dev/null 2>&1");
+ system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
+ system("logger -t ipfire 'QoS stopped'");
}
elsif ($qossettings{'ACTION'} eq $Lang::tr{'restart'})
{
@@ -587,7 +585,6 @@ END
$qossettings{'ENABLED'} = 'on';
&General::writehash("${General::swroot}/qos/settings", \%qossettings);
system("/usr/local/bin/qosctrl generate >/dev/null 2>&1");
- system("/usr/bin/touch /var/ipfire/qos/enable");
system("/usr/local/bin/qosctrl start >/dev/null 2>&1");
system("logger -t ipfire 'QoS started'");
} else {
diff --git a/lfs/openvpn b/lfs/openvpn
index a19ac1f..96e37f7 100644
--- a/lfs/openvpn
+++ b/lfs/openvpn
@@ -1,7 +1,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2007-2014 IPFire Team <info(a)ipfire.org> #
+# Copyright (C) 2015 IPFire Team <info(a)ipfire.org> #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
@@ -24,7 +24,7 @@
include Config
-VER = 2.3.6
+VER = 2.3.7
THISAPP = openvpn-$(VER)
DL_FILE = $(THISAPP).tar.xz
@@ -40,7 +40,7 @@ objects = $(DL_FILE)
$(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-$(DL_FILE)_MD5 = bcc30c296566df14feebdd8aa0e408ca
+$(DL_FILE)_MD5 = 5b819f7cd0b875f55f20a947224967aa
install : $(TARGET)
diff --git a/src/misc-progs/qosctrl.c b/src/misc-progs/qosctrl.c
index 5e1420b..c00dbcf 100644
--- a/src/misc-progs/qosctrl.c
+++ b/src/misc-progs/qosctrl.c
@@ -12,10 +12,14 @@
#include <sys/types.h>
#include <fcntl.h>
#include "setuid.h"
+#include "libsmooth.h"
-int main(int argc, char *argv[]) {
+#define QOS_SH "/var/ipfire/qos/bin/qos.sh"
+int main(int argc, char *argv[]) {
+ struct keyvalue* kv = NULL;
int fd = -1;
+ int r = 0;
if (!(initsetuid()))
exit(1);
@@ -26,30 +30,48 @@ int main(int argc, char *argv[]) {
}
if (strcmp(argv[1], "generate") == 0) {
- safe_system("/usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > /var/ipfire/qos/bin/qos.sh");
+ kv = initkeyvalues();
+ if (!readkeyvalues(kv, CONFIG_ROOT "/qos/settings")) {
+ fprintf(stderr, "Cannot read QoS settings\n");
+ r = 1;
+ goto END;
+ }
+
+ char enabled[STRING_SIZE];
+ if (!findkey(kv, "ENABLED", enabled))
+ strcpy(enabled, "off");
+
+ if (strcmp(enabled, "on") == 0)
+ safe_system("/usr/bin/perl /var/ipfire/qos/bin/makeqosscripts.pl > " QOS_SH);
+ else
+ unlink(QOS_SH);
}
- if ((fd = open("/var/ipfire/qos/bin/qos.sh", O_RDONLY)) != -1) {
+ if ((fd = open(QOS_SH, O_RDONLY)) != -1) {
close(fd);
} else {
// If there is no qos.sh do nothing.
- exit(0);
+ goto END;
}
- safe_system("chmod 755 /var/ipfire/qos/bin/qos.sh &>/dev/null");
+ safe_system("chmod 755 " QOS_SH " &>/dev/null");
if (strcmp(argv[1], "start") == 0) {
- safe_system("/var/ipfire/qos/bin/qos.sh start");
+ safe_system(QOS_SH " start");
} else if (strcmp(argv[1], "stop") == 0) {
- safe_system("/var/ipfire/qos/bin/qos.sh clear");
+ safe_system(QOS_SH " clear");
} else if (strcmp(argv[1], "status") == 0) {
- safe_system("/var/ipfire/qos/bin/qos.sh status");
+ safe_system(QOS_SH " status");
} else if (strcmp(argv[1], "restart") == 0) {
- safe_system("/var/ipfire/qos/bin/qos.sh restart");
+ safe_system(QOS_SH " restart");
} else {
if (strcmp(argv[1], "generate") == 0) {exit(0);}
fprintf(stderr, "\nBad argument given.\n\nqosctrl (start|stop|restart|status|generate)\n\n");
exit(1);
}
- return 0;
+END:
+ if (kv)
+ freekeyvalues(kv);
+
+ return r;
}
hooks/post-receive
--
IPFire 2.x development tree
reply other threads:[~2016-01-05 21:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160105210528.667012120C@argus.ipfire.org \
--to=git@ipfire.org \
--cc=ipfire-scm@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox