diff --git a/include/uapi/linux/netfilter/xt_IDLETIMER.h b/include/uapi/linux/netfilter/xt_IDLETIMER.h index 49ddcdc61c09..07ae4e189044 100644 --- a/include/uapi/linux/netfilter/xt_IDLETIMER.h +++ b/include/uapi/linux/netfilter/xt_IDLETIMER.h @@ -48,7 +48,7 @@ struct idletimer_tg_info_v1 { char label[MAX_IDLETIMER_LABEL_SIZE]; - __u8 send_nl_msg; /* unused: for compatibility with Android */ + __u8 send_nl_msg; __u8 timer_type; /* for kernel module internal use only */ diff --git a/net/netfilter/xt_IDLETIMER.c b/net/netfilter/xt_IDLETIMER.c index 7b2f359bfce4..c63edb18e79b 100644 --- a/net/netfilter/xt_IDLETIMER.c +++ b/net/netfilter/xt_IDLETIMER.c @@ -346,9 +346,6 @@ static int idletimer_tg_checkentry_v1(const struct xt_tgchk_param *par) pr_debug("checkentry targinfo%s\n", info->label); - if (info->send_nl_msg) - return -EOPNOTSUPP; - ret = idletimer_tg_helper((struct idletimer_tg_info *)info); if(ret < 0) { @@ -361,6 +358,11 @@ static int idletimer_tg_checkentry_v1(const struct xt_tgchk_param *par) return -EINVAL; } + if (info->send_nl_msg > 1) { + pr_debug("invalid value for send_nl_msg\n"); + return -EINVAL; + } + mutex_lock(&list_mutex); info->timer = __idletimer_tg_find_by_label(info->label);