|
@@ -2478,6 +2478,12 @@ static struct rt6_info *ip6_route_info_create(struct fib6_config *cfg,
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /* RTF_CACHE is an internal flag; can not be set by userspace */
|
|
|
|
+ if (cfg->fc_flags & RTF_CACHE) {
|
|
|
|
+ NL_SET_ERR_MSG(extack, "Userspace can not set RTF_CACHE");
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
if (cfg->fc_dst_len > 128) {
|
|
if (cfg->fc_dst_len > 128) {
|
|
NL_SET_ERR_MSG(extack, "Invalid prefix length");
|
|
NL_SET_ERR_MSG(extack, "Invalid prefix length");
|
|
goto out;
|
|
goto out;
|