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.)
This commit is contained in:
Yoshinobu Inoue 2000-01-27 10:04:28 +00:00
parent 4dd8b5ab79
commit 9c275a58b3

View File

@ -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));
}