diff options
author | hrs <hrs@FreeBSD.org> | 2014-09-13 18:54:15 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2014-09-13 18:54:15 +0000 |
commit | de7f3e3c402722bf4ff53574b0312000025685af (patch) | |
tree | e1349e07bcb9bdf98dd7796d90ad5414228b6447 /etc/rc.d | |
parent | bf4280c0a854fd618d3acdde6ca8d0b1cb0264cb (diff) | |
download | FreeBSD-src-de7f3e3c402722bf4ff53574b0312000025685af.zip FreeBSD-src-de7f3e3c402722bf4ff53574b0312000025685af.tar.gz |
Do not set net.inet.ip.{sourceroute,accept_sourceroute} in a vnet jail.
The following warnings were displayed:
sysctl: net.inet.ip.sourceroute=0: Operation not permitted
sysctl: net.inet.ip.accept_sourceroute=0: Operation not permitted
Diffstat (limited to 'etc/rc.d')
-rwxr-xr-x | etc/rc.d/routing | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/etc/rc.d/routing b/etc/rc.d/routing index 9cb07e5..f511cd3 100755 --- a/etc/rc.d/routing +++ b/etc/rc.d/routing @@ -326,20 +326,22 @@ options_inet() ${SYSCTL} net.inet.ip.forwarding=0 > /dev/null fi - if checkyesno forward_sourceroute; then - ropts_init inet - echo -n ' do source routing=YES' - ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null - fi + if ! check_jail vnet; then + if checkyesno forward_sourceroute; then + ropts_init inet + echo -n ' do source routing=YES' + ${SYSCTL} net.inet.ip.sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.sourceroute=0 > /dev/null + fi - if checkyesno accept_sourceroute; then - ropts_init inet - echo -n ' accept source routing=YES' - ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null - else - ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null + if checkyesno accept_sourceroute; then + ropts_init inet + echo -n ' accept source routing=YES' + ${SYSCTL} net.inet.ip.accept_sourceroute=1 > /dev/null + else + ${SYSCTL} net.inet.ip.accept_sourceroute=0 > /dev/null + fi fi if checkyesno arpproxy_all; then |