diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2013-03-27 16:10:44 +0100 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2013-03-27 16:12:35 +0100 |
commit | 88d725dff56d7244621f1ba1561ede8142d24400 (patch) | |
tree | 9abfacbba2aaecf33a119bff86d2018c73d82fa3 | |
parent | ab673435f0b7e612d67621dd42bad0c4f5069d3c (diff) | |
download | initscripts-88d725dff56d7244621f1ba1561ede8142d24400.tar initscripts-88d725dff56d7244621f1ba1561ede8142d24400.tar.gz initscripts-88d725dff56d7244621f1ba1561ede8142d24400.tar.bz2 initscripts-88d725dff56d7244621f1ba1561ede8142d24400.tar.xz initscripts-88d725dff56d7244621f1ba1561ede8142d24400.zip |
add ipip6 tunneling support (#928232, raorn@raorn.name)
-rw-r--r-- | sysconfig.txt | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifdown-tunnel | 2 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-tunnel | 11 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 2 |
4 files changed, 12 insertions, 5 deletions
diff --git a/sysconfig.txt b/sysconfig.txt index 4ec472f7..fde8934e 100644 --- a/sysconfig.txt +++ b/sysconfig.txt @@ -932,7 +932,7 @@ Files in /etc/sysconfig/network-scripts/ "mode=active-backup arp_interval=60 arp_ip_target=192.168.1.1,192.168.1.2" Tunnel-specific items: - TYPE=GRE|IPIP + TYPE=GRE|IPIP|IPIP6 MY_INNER_IPADDR=local IP address of the tunnel interface PEER_OUTER_IPADDR=IP address of the remote tunnel endpoint MY_OUTER_IPADDR=IP address of the local tunnel endpoint diff --git a/sysconfig/network-scripts/ifdown-tunnel b/sysconfig/network-scripts/ifdown-tunnel index f764f9bd..a5384b18 100755 --- a/sysconfig/network-scripts/ifdown-tunnel +++ b/sysconfig/network-scripts/ifdown-tunnel @@ -32,7 +32,7 @@ need_config "$CONFIG" source_config # 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." exit 1 fi diff --git a/sysconfig/network-scripts/ifup-tunnel b/sysconfig/network-scripts/ifup-tunnel index 49c52c0b..2eaa4bb7 100755 --- a/sysconfig/network-scripts/ifup-tunnel +++ b/sysconfig/network-scripts/ifup-tunnel @@ -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,14 +59,14 @@ 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." exit 1 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"} diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index bbfa35b0..d240df35 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -141,7 +141,7 @@ source_config () CTC) DEVICETYPE="ctc" ;; - GRE | IPIP) + GRE | IPIP | IPIP6) DEVICETYPE="tunnel" ;; SIT | sit) |