|
@@ -372,8 +372,8 @@ set_target_v2(struct sk_buff *skb, const struct xt_action_param *par)
|
|
|
|
|
|
/* Normalize to fit into jiffies */
|
|
|
if (add_opt.ext.timeout != IPSET_NO_TIMEOUT &&
|
|
|
- add_opt.ext.timeout > UINT_MAX / MSEC_PER_SEC)
|
|
|
- add_opt.ext.timeout = UINT_MAX / MSEC_PER_SEC;
|
|
|
+ add_opt.ext.timeout > IPSET_MAX_TIMEOUT)
|
|
|
+ add_opt.ext.timeout = IPSET_MAX_TIMEOUT;
|
|
|
if (info->add_set.index != IPSET_INVALID_ID)
|
|
|
ip_set_add(info->add_set.index, skb, par, &add_opt);
|
|
|
if (info->del_set.index != IPSET_INVALID_ID)
|
|
@@ -407,8 +407,8 @@ set_target_v3(struct sk_buff *skb, const struct xt_action_param *par)
|
|
|
|
|
|
/* Normalize to fit into jiffies */
|
|
|
if (add_opt.ext.timeout != IPSET_NO_TIMEOUT &&
|
|
|
- add_opt.ext.timeout > UINT_MAX / MSEC_PER_SEC)
|
|
|
- add_opt.ext.timeout = UINT_MAX / MSEC_PER_SEC;
|
|
|
+ add_opt.ext.timeout > IPSET_MAX_TIMEOUT)
|
|
|
+ add_opt.ext.timeout = IPSET_MAX_TIMEOUT;
|
|
|
if (info->add_set.index != IPSET_INVALID_ID)
|
|
|
ip_set_add(info->add_set.index, skb, par, &add_opt);
|
|
|
if (info->del_set.index != IPSET_INVALID_ID)
|
|
@@ -470,7 +470,7 @@ set_target_v3_checkentry(const struct xt_tgchk_param *par)
|
|
|
}
|
|
|
if (((info->flags & IPSET_FLAG_MAP_SKBPRIO) |
|
|
|
(info->flags & IPSET_FLAG_MAP_SKBQUEUE)) &&
|
|
|
- !(par->hook_mask & (1 << NF_INET_FORWARD |
|
|
|
+ (par->hook_mask & ~(1 << NF_INET_FORWARD |
|
|
|
1 << NF_INET_LOCAL_OUT |
|
|
|
1 << NF_INET_POST_ROUTING))) {
|
|
|
pr_info_ratelimited("mapping of prio or/and queue is allowed only from OUTPUT/FORWARD/POSTROUTING chains\n");
|