netfilter: ctnetlink: be more strict when NF_CONNTRACK_MARK is not set
When CONFIG_NF_CONNTRACK_MARK is not set, any CTA_MARK or CTA_MARK_MASK
in netlink message are not supported. We should return an error when one
of them is set, not both
Fixes: 9306425b70
("netfilter: ctnetlink: must check mark attributes vs NULL")
Signed-off-by: Romain Bellan <romain.bellan@wifirst.fr>
Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Родитель
28f715b9e6
Коммит
7c6b412162
|
@ -860,7 +860,7 @@ ctnetlink_alloc_filter(const struct nlattr * const cda[], u8 family)
|
|||
struct ctnetlink_filter *filter;
|
||||
|
||||
#ifndef CONFIG_NF_CONNTRACK_MARK
|
||||
if (cda[CTA_MARK] && cda[CTA_MARK_MASK])
|
||||
if (cda[CTA_MARK] || cda[CTA_MARK_MASK])
|
||||
return ERR_PTR(-EOPNOTSUPP);
|
||||
#endif
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче