#
# 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 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# Copyright 2016 Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
#
smf_configure_ip || exit $SMF_EXIT_OK
{
FMRI=$1
file=`fmri_to_file ${FMRI} $IPF_SUFFIX`
#
# route:default is enabled iff route discovery is required. Allow
# incoming icmp from routers for successful discovery.
#
# A potential router so apply policy to RIP, 520 udp
#
tport=`$SERVINFO -p -t -s $iana_name 2>/dev/null`
uport=`$SERVINFO -p -u -s $iana_name 2>/dev/null`
fi
fi
}
if [ -n "$1" -a "$1" = "ipfilter" ]; then
exit "$SMF_EXIT_OK"
fi
options="AdghmnqsStvVzT:F:P:"
#
# Handle upgrade - routing/daemon-args property must be mapped to properties
# in routeadm property group. Note that the SMF-incompatible -t option is not
# supported, since it requires that in.routed run in the foreground.
#
if [ -n "$daemon_args" ]; then
"$options" "A" ignore_auth false true
"$options" "F" minimize_routes
"$options" "g" offer_default_route true false
"$options" "h" advertise_host_routes false true
"$options" "m" advertise_host_routes_primary true false
"$options" "n" install_routes false true
"$options" "P" parameters
"$options" "q" quiet_mode true false
"$options" "s" supply_routes true false
"$options" "S" default_routes_only true false
fi
#
# Assemble arguments to daemon from properties
#
A false`"
offer_default_route g true`"
advertise_host_routes h false`"
advertise_host_routes_primary m true`"
install_routes n false`"
quiet_mode q true`"
supply_routes s true`"
default_routes_only S true`"
debug z true`"
if [ -n "$args" ]; then
args="-${args}"
fi
minimize_routes F`"
$SMF_FMRI parameters P`"
log_file T`"
exit "$SMF_EXIT_OK"