Merge branch 'next' of git.ipfire.org:/pub/git/ipfire-2.x into next

This commit is contained in:
Arne Fitzenreiter
2015-09-28 18:42:57 +02:00
48 changed files with 2345 additions and 2282 deletions

View File

@@ -391,8 +391,9 @@ sub get_address
# IPsec networks.
} elsif ($key ~~ ["ipsec_net_src", "ipsec_net_tgt", "IpSec Network"]) {
my $network_address = &get_ipsec_net_ip($value, 11);
if ($network_address) {
push(@ret, [$network_address, ""]);
my @nets = split(/\|/, $network_address);
foreach my $net (@nets) {
push(@ret, [$net, ""]);
}
# The firewall's own IP addresses.

View File

@@ -62,7 +62,6 @@ etc/rc.d/init.d/mounttmpfs
#etc/rc.d/init.d/netsnmpd
etc/rc.d/init.d/network
etc/rc.d/init.d/network-trigger
etc/rc.d/init.d/network-vlans
#etc/rc.d/init.d/networking
etc/rc.d/init.d/networking/any
etc/rc.d/init.d/networking/blue
@@ -232,7 +231,6 @@ etc/rc.d/rcsysinit.d/S75firstsetup
etc/rc.d/rcsysinit.d/S80localnet
etc/rc.d/rcsysinit.d/S85firewall
etc/rc.d/rcsysinit.d/S90network-trigger
etc/rc.d/rcsysinit.d/S91network-vlans
etc/rc.d/rcsysinit.d/S92rngd
etc/rc.d/rc3.d/S15fireinfo
#etc/sysconfig

View File

@@ -64,7 +64,6 @@ etc/rc.d/init.d/mounttmpfs
#etc/rc.d/init.d/netsnmpd
etc/rc.d/init.d/network
etc/rc.d/init.d/network-trigger
etc/rc.d/init.d/network-vlans
#etc/rc.d/init.d/networking
etc/rc.d/init.d/networking/any
etc/rc.d/init.d/networking/blue
@@ -237,7 +236,6 @@ etc/rc.d/rcsysinit.d/S75firstsetup
etc/rc.d/rcsysinit.d/S80localnet
etc/rc.d/rcsysinit.d/S85firewall
etc/rc.d/rcsysinit.d/S90network-trigger
etc/rc.d/rcsysinit.d/S91network-vlans
etc/rc.d/rcsysinit.d/S92rngd
etc/rc.d/rc3.d/S15fireinfo
#etc/sysconfig

View File

@@ -29,6 +29,7 @@ lib/udev
#lib/udev/init-net-rules.sh
#lib/udev/mtd_probe
#lib/udev/network-hotplug-rename
#lib/udev/network-hotplug-vlan
#lib/udev/rule_generator.functions
#lib/udev/rules.d
#lib/udev/rules.d/25-alsa.rules

View File

@@ -0,0 +1,8 @@
etc/system-release
etc/issue
lib/udev/network-hotplug-vlan
lib/udev/rules.d/60-net.rules
srv/web/ipfire/cgi-bin/connections.cgi
srv/web/ipfire/cgi-bin/vpnmain.cgi
usr/lib/firewall/firewall-lib.pl
var/ipfire/langs

View File

@@ -0,0 +1,61 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 3 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2015 IPFire-Team <info@ipfire.org>. #
# #
############################################################################
#
. /opt/pakfire/lib/functions.sh
/usr/local/bin/backupctrl exclude >/dev/null 2>&1
# Remove old core updates from pakfire cache to save space...
core=95
for (( i=1; i<=$core; i++ ))
do
rm -f /var/cache/pakfire/core-upgrade-*-$i.ipfire
done
# Remove files
rm -f /etc/rc.d/init.d/network-vlans
rm -f /etc/rc.d/rcsysinit.d/S91network-vlans
# Stop services
# Extract files
extract_files
# Update Language cache
/usr/local/bin/update-lang-cache
# Start services
# This update need a reboot...
#touch /var/run/need_reboot
# Finish
/etc/init.d/fireinfo start
sendprofile
# Update grub config to display new core version
if [ -e /boot/grub/grub.cfg ]; then
grub-mkconfig -o /boot/grub/grub.cfg
fi
sync
# Don't report the exitcode last command
exit 0

View File

@@ -0,0 +1,22 @@
boot/config.txt
etc/alternatives
etc/collectd.custom
etc/ipsec.conf
etc/ipsec.secrets
etc/ipsec.user.conf
etc/ipsec.user.secrets
etc/localtime
etc/shadow
etc/ssh/ssh_config
etc/ssh/sshd_config
etc/ssl/openssl.cnf
etc/sudoers
etc/sysconfig/firewall.local
etc/sysconfig/rc.local
etc/udev/rules.d/30-persistent-network.rules
srv/web/ipfire/html/proxy.pac
var/ipfire/ovpn
var/lib/alternatives
var/log/cache
var/state/dhcp/dhcpd.leases
var/updatecache

View File

@@ -0,0 +1 @@
DEPS=""

View File

@@ -1,3 +1,7 @@
# Call a script that checks for the right name of the new device.
# If it matches the configuration it will be renamed accordingly.
ACTION=="add", SUBSYSTEM=="net", PROGRAM="/lib/udev/network-hotplug-rename", RESULT=="?*", NAME="$result"
# Call a script that will create all virtual devices for a parent device
# that has just come up.
ACTION=="add", SUBSYSTEM=="net", PROGRAM="/lib/udev/network-hotplug-vlan"

View File

@@ -0,0 +1,87 @@
#!/bin/bash
############################################################################
# #
# This file is part of the IPFire Firewall. #
# #
# IPFire is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# IPFire is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# You should have received a copy of the GNU General Public License #
# along with IPFire; if not, write to the Free Software #
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
# #
# Copyright (C) 2015 IPFire Team <info@ipfire.org> #
# #
############################################################################
[ -n "${INTERFACE}" ] || exit 2
CONFIG_FILE="/var/ipfire/ethernet/vlans"
# Skip immediately if no configuration file has been found.
[ -e "${CONFIG_FILE}" ] || exit 0
eval $(/usr/local/bin/readhash ${CONFIG_FILE})
for interface in green0 red0 blue0 orange0; do
case "${interface}" in
green*)
PARENT_DEV=${GREEN_PARENT_DEV}
VLAN_ID=${GREEN_VLAN_ID}
MAC_ADDRESS=${GREEN_MAC_ADDRESS}
;;
red*)
PARENT_DEV=${RED_PARENT_DEV}
VLAN_ID=${RED_VLAN_ID}
MAC_ADDRESS=${RED_MAC_ADDRESS}
;;
blue*)
PARENT_DEV=${BLUE_PARENT_DEV}
VLAN_ID=${BLUE_VLAN_ID}
MAC_ADDRESS=${BLUE_MAC_ADDRESS}
;;
orange*)
PARENT_DEV=${ORANGE_PARENT_DEV}
VLAN_ID=${ORANGE_VLAN_ID}
MAC_ADDRESS=${ORANGE_MAC_ADDRESS}
;;
esac
# If the parent device does not match the interface that
# has just come up, we will go on for the next one.
[ "${PARENT_DEV}" = "${INTERFACE}" ] || continue
# Check if the interface does already exists.
# If so, we skip creating it.
if [ -d "/sys/class/net/${interface}" ]; then
echo "Interface ${interface} already exists." >&2
continue
fi
if [ -z "${VLAN_ID}" ]; then
echo "${interface}: You did not set the VLAN ID." >&2
continue
fi
# Build command line.
command="ip link add link ${PARENT_DEV} name ${interface}"
if [ -n "${MAC_ADDRESS}" ]; then
command="${command} address ${MAC_ADDRESS}"
fi
command="${command} type vlan id ${VLAN_ID}"
echo "Creating VLAN interface ${interface}..."
${command}
# Bring up the parent device.
ip link set ${PARENT_DEV} up
done
exit 0