diff options
Diffstat (limited to 'sysconfig/network-scripts/ifup-tunnel')
-rwxr-xr-x | sysconfig/network-scripts/ifup-tunnel | 13 |
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"} |