diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 4be722667a17..b247b3256c1b 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -219,6 +219,7 @@ nis_yppasswdd_flags="" # Flags to rpc.yppasswdd (if enabled). ### Network routing options: ### defaultrouter="NO" # Set to default gateway (or NO). static_routes="" # Set to static route list (or leave empty). +natm_static_routes="" # Set to static route list for NATM (or leave empty). gateway_enable="NO" # Set to YES if this host will be a gateway. router_enable="NO" # Set to YES to enable a routing daemon. router="/sbin/routed" # Name of routing daemon to use if enabled. diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 2c91bf06844e..d083a261b51d 100644 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -48,6 +48,14 @@ static_start() route add ${route_args} done fi + # Now ATM static routes + # + if [ -n "${natm_static_routes}" ]; then + for i in ${natm_static_routes}; do + eval route_args=\$route_${i} + atmconfig natm add ${route_args} + done + fi } options_start() diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index 8a8ff6a372e1..4937d2dd4dd2 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -1551,6 +1551,19 @@ variable is assumed to exist whose contents will later be passed to a .Dq Nm route Cm add Fl inet6 operation. +.It Va natm_static_routes +.Pq Vt str +The +.Xr natmip 4 +equivalent of +.Va static_routes . +If not empty then for each whitespace separated +.Ar element +in the value, a +.Va route_ Ns Aq Ar element +variable is assumed to exist whose contents will later be passed to a +.Dq Nm atmconfig Cm natm Cm add +operation. .It Va gateway_enable .Pq Vt bool If set to