summaryrefslogtreecommitdiffstats
path: root/sys/netinet6
diff options
context:
space:
mode:
authorshin <shin@FreeBSD.org>2000-01-27 10:04:28 +0000
committershin <shin@FreeBSD.org>2000-01-27 10:04:28 +0000
commit2ef83ec04a5ee12ee2b1960b1bee4d9ee87223f1 (patch)
tree251ee4264b16b658a22621f374e41ef0fa96b79f /sys/netinet6
parentce15efb7c04858f00b57c16093d4a3043809048e (diff)
downloadFreeBSD-src-2ef83ec04a5ee12ee2b1960b1bee4d9ee87223f1.zip
FreeBSD-src-2ef83ec04a5ee12ee2b1960b1bee4d9ee87223f1.tar.gz
Added ip6_forwarding check when prefix related ioctl is called.
(prefix related ioctl should only be called on router, because host use dynamic address and prefix configuration mechanism, and those prefix are managed separately with ones whih are assined manually.)
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/in6.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 0a326d7..d744b04 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -461,6 +461,8 @@ in6_control(so, cmd, data, ifp, p)
return(EPERM);
/*fall through*/
case SIOCGIFPREFIX_IN6:
+ if (ip6_forwarding == 0)
+ return(EPERM);
return(in6_prefix_ioctl(so, cmd, data, ifp));
}
OpenPOWER on IntegriCloud