Merge remote-tracking branch 'origin/next' into thirteen
authorArne Fitzenreiter <arne_f@ipfire.org>
Mon, 17 Dec 2012 09:16:46 +0000 (10:16 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Mon, 17 Dec 2012 09:16:46 +0000 (10:16 +0100)
config/rootfiles/common/configroot
config/rootfiles/core/65/filelists/files
html/cgi-bin/routing.cgi
lfs/configroot
src/misc-progs/launch-ether-wake.c
src/scripts/ovpn-ccd-convert

index e14f7e0e23b2ea68bd3ef9e7d35c8d49f63fb793..1d2fc9d1d71baad4fbeb0a64ea7b0d387578f0a9 100644 (file)
@@ -110,6 +110,10 @@ var/ipfire/outgoing/defaultservices
 #var/ipfire/outgoing/p2protocols
 #var/ipfire/outgoing/rules
 #var/ipfire/outgoing/settings
+var/ipfire/ovpn
+var/ipfire/ovpn/ccd.conf
+var/ipfire/ovpn/ccdroute
+var/ipfire/ovpn/ccdroute2
 var/ipfire/pakfire
 #var/ipfire/pakfire/settings
 #var/ipfire/patches
index 67bd0b38e6cea32fbd7cf596cdb2f35e02cef36c..13788f1476292b77f9a4208438ea85897b12da85 100644 (file)
@@ -3,7 +3,9 @@ etc/system-release
 etc/issue
 srv/web/ipfire/cgi-bin/logs.cgi/calamaris.dat
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
+srv/web/ipfire/cgi-bin/routing.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
+usr/local/bin/launch-ether-wake
 usr/sbin/ovpn-ccd-convert
 var/ipfire/general-functions.pl
 var/ipfire/langs
index 86e04293a406ada5098ee950a8e72818b02944fb..afcd38822d6fff49a5d0c592e1431df074d6ce99 100644 (file)
@@ -118,6 +118,8 @@ if ($settings{'ACTION'} eq $Lang::tr{'toggle enable disable'}) {
 }
 
 if ($settings{'ACTION'} eq $Lang::tr{'add'}) {
+       # Convert subnet masks to CIDR notation.
+       $settings{'IP'} = &General::iporsubtocidr($settings{'IP'});
 
 # Validate inputs
        if (( !&General::validip($settings{'IP'})) and ( !&General::validipandmask($settings{'IP'}))){
@@ -443,4 +445,4 @@ sub SortDataFile
 #
 sub BuildConfiguration {
     system '/usr/local/bin/rebuildroutes';
-}
\ No newline at end of file
+}
index 90f5afab6cffe0b1e28f134216ca4e61e67ce3f7..f8fe4264293fbb9ff273c8df6b643dadb76b723f 100644 (file)
@@ -53,7 +53,7 @@ $(TARGET) :
        for i in addon-lang auth backup ca certs connscheduler crls ddns dhcp dhcpc dmzholes dns \
                        ethernet extrahd/bin fwlogs isdn key langs logging mac main  menu.d modem net-traffic \
                        net-traffic/templates nfs optionsfw outgoing/bin outgoing/groups outgoing/groups/ipgroups \
-                       outgoing/groups/macgroups patches pakfire portfw ppp private proxy/advanced/cre \
+                       outgoing/groups/macgroups ovpn patches pakfire portfw ppp private proxy/advanced/cre \
                        proxy/calamaris/bin qos/bin red remote sensors snort time tripwire/report \
                        updatexlrator/bin updatexlrator/autocheck urlfilter/autoupdate urlfilter/bin upnp vpn \
                        wakeonlan wireless xtaccess ; do \
@@ -66,7 +66,7 @@ $(TARGET) :
            dhcp/fixleases dhcp/advoptions dhcp/dhcpd.conf.local dmzholes/config dns/settings ethernet/aliases ethernet/settings ethernet/known_nics ethernet/scanned_nics \
            extrahd/scan extrahd/devices extrahd/partitions extrahd/settings fwlogs/ipsettings fwlogs/portsettings \
            isdn/settings mac/settings main/disable_nf_sip main/hosts main/routing main/settings net-traffic/settings optionsfw/settings outgoing/settings outgoing/rules \
-           pakfire/settings portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
+           ovpn/ccd.conf ovpn/ccdroute ovpn/ccdroute2 pakfire/settings portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
            ppp/settings-5 ppp/settings proxy/settings proxy/advanced/settings proxy/advanced/cre/enable remote/settings qos/settings qos/classes qos/subclasses qos/level7config qos/portconfig \
            qos/tosconfig snort/settings tripwire/settings upnp/settings vpn/config vpn/settings vpn/ipsec.conf \
            vpn/ipsec.secrets vpn/caconfig wakeonlan/clients.conf wireless/config wireless/settings; do \
index f487041db9441b95b78ba51967c616c35c7a03ca..cac4d3c3feb7914bb7ee2d96c25f87b4f19e552d 100644 (file)
@@ -29,5 +29,9 @@ int main(int argc, char *argv[])
   snprintf(command, BUFFER_SIZE-1, "/usr/sbin/etherwake -i %s %s", argv[2], argv[1]);
   safe_system(command);
 
+  /* Send magic packet with broadcast flag set. */
+  snprintf(command, BUFFER_SIZE-1, "/usr/sbin/etherwake -i %s -b %s", argv[2], argv[1]);
+  safe_system(command);
+
   return(0);
 }
index 86b7c94a56a62e8bdeaa3a31f6f3a4a346c1bcc6..ac76435f6bf0742d999733252de7671a4616ac07 100644 (file)
@@ -1,13 +1,15 @@
 #!/usr/bin/perl
-
+# Converter script for old openvpn clients
 my %net=();
 my %ovpnconfig=();
 my @serverconf=();
 my $greennet;
 my $greensubnet;
 my $running='off';
-require '/var/ipfire/general-functions.pl';
 
+require '/var/ipfire/general-functions.pl';
+unless (-d "${General::swroot}/ovpn/ccd") { system("mkdir ${General::swroot}/ovpn/ccd"); }
+system ("chown nobody.nobody ${General::swroot}/ovpn/ccd");
 if ( -e "/var/run/openvpn.pid"){
        $running='on';
        system('/usr/local/bin/openvpnctrl', '-k');
@@ -46,3 +48,4 @@ if ($running eq 'on')
 {
        system('/usr/local/bin/openvpnctrl', '-s');
 }
+system ("chown nobody:nobody /var/ipfire/ovpn/ccd/*");