aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-tunnel
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2014-08-30 12:09:08 +0100
committerColin Guthrie <colin@mageia.org>2014-08-30 12:09:08 +0100
commitea427ad757e8b7c2c4bf7a2cd4176ebaefcbf3be (patch)
tree5913ccda5f0cf4e3e62fd2d0b070bef9b357a9b5 /sysconfig/network-scripts/ifup-tunnel
parentf7d3fead844d504c88ef4bd2bd3b2a5d168cd1eb (diff)
parente2d575550ef975cb3cf5456060d75a66cd63aee4 (diff)
downloadinitscripts-ea427ad757e8b7c2c4bf7a2cd4176ebaefcbf3be.tar
initscripts-ea427ad757e8b7c2c4bf7a2cd4176ebaefcbf3be.tar.gz
initscripts-ea427ad757e8b7c2c4bf7a2cd4176ebaefcbf3be.tar.bz2
initscripts-ea427ad757e8b7c2c4bf7a2cd4176ebaefcbf3be.tar.xz
initscripts-ea427ad757e8b7c2c4bf7a2cd4176ebaefcbf3be.zip
Merge tag 'initscripts-9.55-1' into distro/mga
Tag as initscripts-9.55-1 Conflicts: Makefile lang.csh lang.sh po/Makefile ppp/ip-down ppp/ip-up rc.d/init.d/network service sysconfig.txt sysconfig/init sysconfig/network-scripts/ifdown-ppp sysconfig/network-scripts/ifup sysconfig/network-scripts/ifup-eth sysconfig/network-scripts/ifup-ippp sysconfig/network-scripts/ifup-ppp sysconfig/network-scripts/ifup-wireless sysconfig/network-scripts/network-functions sysctl.conf systemd/fedora-storage-init Notes: ppp support was dropped upstream so we will need to merge it into the ppp package as Fedora has done. The fedora-storage-init stuff has been dropped. LVM+Raid is typically initialised automatically now via udev rules etc. We should try and follow suit, but may need to add the legacy script back in for now.
Diffstat (limited to 'sysconfig/network-scripts/ifup-tunnel')
-rwxr-xr-xsysconfig/network-scripts/ifup-tunnel13
1 files changed, 10 insertions, 3 deletions
diff --git a/sysconfig/network-scripts/ifup-tunnel b/sysconfig/network-scripts/ifup-tunnel
index b235bfe0..a4762127 100755
--- a/sysconfig/network-scripts/ifup-tunnel
+++ b/sysconfig/network-scripts/ifup-tunnel
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
# Thanks to:
# - Razvan Corneliu C.R. Vilt <razvan.vilt@linux360.ro>
@@ -39,12 +39,19 @@ fi
case "$TYPE" in
GRE)
MODE=gre
+ proto=-4
/sbin/modprobe ip_gre
;;
IPIP)
MODE=ipip
+ proto=-4
/sbin/modprobe ipip
;;
+ IPIP6)
+ MODE=ipip6
+ proto=-6
+ /sbin/modprobe ip6_tunnel
+ ;;
*)
net_log $"Invalid tunnel type $TYPE"
exit 1
@@ -52,7 +59,7 @@ case "$TYPE" in
esac
# Generic tunnel devices are not supported here
-if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 ]; then
+if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 -o "$DEVICE" = ip6tnl0 ]; then
net_log $"Device '$DEVICE' isn't supported as a valid GRE device name."
mdv-network-event connection_failure ${DEVICE}
exit 1
@@ -60,7 +67,7 @@ fi
# Create the tunnel
# The outer addresses are those of the underlying (public) network.
-/sbin/ip tunnel add "$DEVICE" mode "$MODE" \
+/sbin/ip $proto tunnel add "$DEVICE" mode "$MODE" \
${MY_OUTER_IPADDR:+local "$MY_OUTER_IPADDR"} \
${PEER_OUTER_IPADDR:+remote "$PEER_OUTER_IPADDR"} \
${KEY:+key "$KEY"} ${TTL:+ttl "$TTL"}