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 bd767b27c85b2c6992cac38781b7bb78a03b694a (commit)
via e528fb2c7352bf8f2b5c2bc3e298bfa4c34b9d31 (commit)
via bd33c332275ccb041a908c6e53ba78a1fa82f900 (commit)
from 557d986cbb406369e0c253879e25f7c21f442830 (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 bd767b27c85b2c6992cac38781b7bb78a03b694a
Author: Lars Schuhmacher <larsen007(a)web.de>
Date: Thu Jun 4 00:58:49 2015 +0200
ipsec.conf: Include ipsec.user.conf and ipsec.user-post.conf
Fix bug 10869 as the code has been removed by mistake by the
previous commit dfea4f86c22c83e07d0f4a6f2a02166229ecb120.
It also includes ipsec.user.conf only when it exists.
Signed-off-by: Lars Schuhmacher <larsen007(a)web.de>
Signed-off-by: Michael Tremer <michael.tremer(a)ipfire.org>
commit e528fb2c7352bf8f2b5c2bc3e298bfa4c34b9d31
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Jun 3 18:00:13 2015 +0200
rebuildhosts: Don't break when RED not online
The hosts file was not regenerated when RED was not connected
which should not be happening.
This patch checks if the file exists. If not, the gateway
line will not be written to /etc/hosts.
commit bd33c332275ccb041a908c6e53ba78a1fa82f900
Author: Michael Tremer <michael.tremer(a)ipfire.org>
Date: Wed Jun 3 17:55:55 2015 +0200
rebuildhosts: Fix SEGV when not online
Fixes #10867
-----------------------------------------------------------------------
Summary of changes:
html/cgi-bin/vpnmain.cgi | 14 ++++++++++++--
src/misc-progs/rebuildhosts.c | 20 ++++++++------------
2 files changed, 20 insertions(+), 14 deletions(-)
Difference in files:
diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi
index 9490076..218dafa 100644
--- a/html/cgi-bin/vpnmain.cgi
+++ b/html/cgi-bin/vpnmain.cgi
@@ -253,8 +253,10 @@ sub writeipsecfiles {
print CONF "\n";
# Add user includes to config file
- print CONF "include /etc/ipsec.user.conf\n";
- print CONF "\n";
+ if (-e "/etc/ipsec.user.conf") {
+ print CONF "include /etc/ipsec.user.conf\n";
+ print CONF "\n";
+ }
print SECRETS "include /etc/ipsec.user.secrets\n";
@@ -407,6 +409,14 @@ sub writeipsecfiles {
print CONF "\n";
}#foreach key
+
+ # Add post user includes to config file
+ # After the GUI-connections allows to patch connections.
+ if (-e "/etc/ipsec.user-post.conf") {
+ print CONF "include /etc/ipsec.user-post.conf\n";
+ print CONF "\n";
+ }
+
print SECRETS $last_secrets if ($last_secrets);
close(CONF);
close(SECRETS);
diff --git a/src/misc-progs/rebuildhosts.c b/src/misc-progs/rebuildhosts.c
index 21c5236..f77c2df 100644
--- a/src/misc-progs/rebuildhosts.c
+++ b/src/misc-progs/rebuildhosts.c
@@ -79,18 +79,13 @@ int main(int argc, char *argv[])
freekeyvalues(kv);
kv = NULL;
- if (!(gw = fopen(CONFIG_ROOT "/red/remote-ipaddress", "r")))
- {
+ if ((gw = fopen(CONFIG_ROOT "/red/remote-ipaddress", "r"))) {
+ if (fgets(gateway, STRING_SIZE, gw) == NULL) {
+ fprintf(stderr, "Couldn't read remote-ipaddress\n");
+ exit(1);
+ }
+ } else {
fprintf(stderr, "Couldn't open remote-ipaddress file\n");
- fclose(gw);
- gw = NULL;
- exit(1);
- }
-
- if (fgets(gateway, STRING_SIZE, gw) == NULL)
- {
- fprintf(stderr, "Couldn't read remote-ipaddress\n");
- exit(1);
}
if (!(fd = fopen(CONFIG_ROOT "/main/hosts", "r")))
@@ -112,7 +107,8 @@ int main(int argc, char *argv[])
else
fprintf(hosts, "%s\t%s\n",address,hostname);
- fprintf(hosts, "%s\tgateway\n",gateway);
+ if (strlen(gateway) > 0)
+ fprintf(hosts, "%s\tgateway\n", gateway);
while (fgets(buffer, STRING_SIZE, fd))
{
hooks/post-receive
--
IPFire 2.x development tree