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:
shin 2000-01-27 10:04:28 +00:00
parent ce15efb7c0
commit 2ef83ec04a

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