routing (207225) | routing (220153) |
---|---|
1#!/bin/sh 2# 3# Configure routing and miscellaneous network tunables 4# | 1#!/bin/sh 2# 3# Configure routing and miscellaneous network tunables 4# |
5# $FreeBSD: head/etc/rc.d/routing 207225 2010-04-26 15:31:58Z ume $ | 5# $FreeBSD: head/etc/rc.d/routing 220153 2011-03-30 01:19:00Z emaste $ |
6# 7 8# PROVIDE: routing 9# REQUIRE: faith netif ppp stf 10# KEYWORD: nojail 11 12. /etc/rc.subr 13. /etc/network.subr --- 245 unchanged lines hidden (view full) --- 259 fi 260} 261 262options_inet() 263{ 264 if checkyesno icmp_bmcastecho; then 265 ropts_init 266 echo -n ' broadcast ping responses=YES' | 6# 7 8# PROVIDE: routing 9# REQUIRE: faith netif ppp stf 10# KEYWORD: nojail 11 12. /etc/rc.subr 13. /etc/network.subr --- 245 unchanged lines hidden (view full) --- 259 fi 260} 261 262options_inet() 263{ 264 if checkyesno icmp_bmcastecho; then 265 ropts_init 266 echo -n ' broadcast ping responses=YES' |
267 ${SYSCTL_W} net.inet.icmp.bmcastecho=1 > /dev/null | 267 ${SYSCTL} net.inet.icmp.bmcastecho=1 > /dev/null |
268 else | 268 else |
269 ${SYSCTL_W} net.inet.icmp.bmcastecho=0 > /dev/null | 269 ${SYSCTL} net.inet.icmp.bmcastecho=0 > /dev/null |
270 fi 271 272 if checkyesno icmp_drop_redirect; then 273 ropts_init 274 echo -n ' ignore ICMP redirect=YES' | 270 fi 271 272 if checkyesno icmp_drop_redirect; then 273 ropts_init 274 echo -n ' ignore ICMP redirect=YES' |
275 ${SYSCTL_W} net.inet.icmp.drop_redirect=1 > /dev/null | 275 ${SYSCTL} net.inet.icmp.drop_redirect=1 > /dev/null |
276 else | 276 else |
277 ${SYSCTL_W} net.inet.icmp.drop_redirect=0 > /dev/null | 277 ${SYSCTL} net.inet.icmp.drop_redirect=0 > /dev/null |
278 fi 279 280 if checkyesno icmp_log_redirect; then 281 ropts_init 282 echo -n ' log ICMP redirect=YES' | 278 fi 279 280 if checkyesno icmp_log_redirect; then 281 ropts_init 282 echo -n ' log ICMP redirect=YES' |
283 ${SYSCTL_W} net.inet.icmp.log_redirect=1 > /dev/null | 283 ${SYSCTL} net.inet.icmp.log_redirect=1 > /dev/null |
284 else | 284 else |
285 ${SYSCTL_W} net.inet.icmp.log_redirect=0 > /dev/null | 285 ${SYSCTL} net.inet.icmp.log_redirect=0 > /dev/null |
286 fi 287 288 if checkyesno gateway_enable; then 289 ropts_init 290 echo -n ' IPv4 gateway=YES' | 286 fi 287 288 if checkyesno gateway_enable; then 289 ropts_init 290 echo -n ' IPv4 gateway=YES' |
291 ${SYSCTL_W} net.inet.ip.forwarding=1 > /dev/null | 291 ${SYSCTL} net.inet.ip.forwarding=1 > /dev/null |
292 else | 292 else |
293 ${SYSCTL_W} net.inet.ip.forwarding=0 > /dev/null | 293 ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null |
294 fi 295 296 if checkyesno forward_sourceroute; then 297 ropts_init 298 echo -n ' do source routing=YES' | 294 fi 295 296 if checkyesno forward_sourceroute; then 297 ropts_init 298 echo -n ' do source routing=YES' |
299 ${SYSCTL_W} net.inet.ip.sourceroute=1 > /dev/null | 299 ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null |
300 else | 300 else |
301 ${SYSCTL_W} net.inet.ip.sourceroute=0 > /dev/null | 301 ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null |
302 fi 303 304 if checkyesno accept_sourceroute; then 305 ropts_init 306 echo -n ' accept source routing=YES' | 302 fi 303 304 if checkyesno accept_sourceroute; then 305 ropts_init 306 echo -n ' accept source routing=YES' |
307 ${SYSCTL_W} net.inet.ip.accept_sourceroute=1 > /dev/null | 307 ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null |
308 else | 308 else |
309 ${SYSCTL_W} net.inet.ip.accept_sourceroute=0 > /dev/null | 309 ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null |
310 fi 311 312 if checkyesno arpproxy_all; then 313 ropts_init 314 echo -n ' ARP proxyall=YES' | 310 fi 311 312 if checkyesno arpproxy_all; then 313 ropts_init 314 echo -n ' ARP proxyall=YES' |
315 ${SYSCTL_W} net.link.ether.inet.proxyall=1 > /dev/null | 315 ${SYSCTL} net.link.ether.inet.proxyall=1 > /dev/null |
316 else | 316 else |
317 ${SYSCTL_W} net.link.ether.inet.proxyall=0 > /dev/null | 317 ${SYSCTL} net.link.ether.inet.proxyall=0 > /dev/null |
318 fi 319} 320 321options_inet6() 322{ 323 if checkyesno ipv6_gateway_enable; then 324 ropts_init 325 echo -n ' IPv6 gateway=YES' | 318 fi 319} 320 321options_inet6() 322{ 323 if checkyesno ipv6_gateway_enable; then 324 ropts_init 325 echo -n ' IPv6 gateway=YES' |
326 ${SYSCTL_W} net.inet6.ip6.forwarding=1 > /dev/null | 326 ${SYSCTL} net.inet6.ip6.forwarding=1 > /dev/null |
327 else | 327 else |
328 ${SYSCTL_W} net.inet6.ip6.forwarding=0 > /dev/null | 328 ${SYSCTL} net.inet6.ip6.forwarding=0 > /dev/null |
329 fi 330} 331 332options_atm() 333{ 334} 335 336options_ipx() 337{ 338 if checkyesno ipxgateway_enable; then 339 ropts_init 340 echo -n ' IPX gateway=YES' | 329 fi 330} 331 332options_atm() 333{ 334} 335 336options_ipx() 337{ 338 if checkyesno ipxgateway_enable; then 339 ropts_init 340 echo -n ' IPX gateway=YES' |
341 ${SYSCTL_W} net.ipx.ipx.ipxforwarding=1 > /dev/null | 341 ${SYSCTL} net.ipx.ipx.ipxforwarding=1 > /dev/null |
342 else | 342 else |
343 ${SYSCTL_W} net.ipx.ipx.ipxforwarding=0 > /dev/null | 343 ${SYSCTL} net.ipx.ipx.ipxforwarding=0 > /dev/null |
344 fi 345} 346 347load_rc_config $name 348run_rc_command "$@" | 344 fi 345} 346 347load_rc_config $name 348run_rc_command "$@" |