net-iptun revision 6e91bba0d6c6bdabbba62cefae583715a4a58e2a
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2010 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# This service configures IP tunnel links and IP interfaces over IP
# tunnels.
#
#
# Configure tunnels which were deferred by /lib/svc/method/net-physical (the
# addresses being available.
#
# WARNING: you may wish to turn OFF forwarding if you haven't already, because
# of various possible security vulnerabilities when configuring tunnels for
# Virtual Private Network (VPN) construction.
#
# executed before NIS is started.
#
#
# get_tunnel_links: print the names of the tunnel links currently configured
# on the running system.
#
{
}
# plumb_tunnel <intf_name> <net_type> <intf_file>
plumb_tunnel ()
{
while read ifcmds; do
fi
}
case "$1" in
# First, bring up tunnel links
#
# Get the list of IP tunnel interfaces we'll need to configure. These
# are comprised of IP interfaces over the tunnels we've just brought
# up in the above dladm command, and the implicit tunnels named "ip.*"
# that we'll also create for backward compatibility. When we build
# the list of implicit tunnels, we have to make sure that they're not
# different kinds of links that are simply named "ip.*".
#
implicit_tunnel_names=`/usr/bin/ls -1 /etc/hostname.ip*.*[0-9] \
if [ $? -ne 0 ]; then
fi
done
tunnel_interfaces=`for intf in $tunnel_links $implicit_tunnels; do \
fi
fi
#
# Configure IP tunnel interfaces set up using ipadm
#
#
# skip if not managed my ipadm or if not a persistent
# interface
#
continue;
echo "found /etc/hostname.$intf_name or "\
"/etc/hostname6.$intfi_name, ignoring ipadm "\
continue;
else
# Enable the interface managed by ipadm
fi
done
#
# Set 6to4 Relay Router communication support policy and, if
# applicable, the destination Relay Router IPv4 address. See
# ACCEPT6TO4RELAY and RELAY6TO4ADDR. If ACCEPT6TO4RELAY=NO, the
# default value in the kernel will be used.
#
if [ "$ACCEPT6TO4RELAY" = yes ]; then
if [ "$RELAY6TO4ADDR" ]; then
else
fi
fi
;;
stop)
# Unplumb IP interfaces
done
# Take down the IP tunnel links
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit $SMF_EXIT_OK