netfilter: x_tables: rate-limit table mismatch warnings
authorFlorian Westphal <fw@strlen.de>
Fri, 9 Feb 2018 14:52:05 +0000 (15:52 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 14 Feb 2018 20:05:36 +0000 (21:05 +0100)
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/ipt_rpfilter.c
net/ipv6/netfilter/ip6t_rpfilter.c
net/netfilter/xt_CONNSECMARK.c
net/netfilter/xt_SECMARK.c

index 37fb9552e85898d0ee9b311f22af31563c621de7..5d107dd9098e6f8e231ea55de86c44e9222321f8 100644 (file)
@@ -111,8 +111,8 @@ static int rpfilter_check(const struct xt_mtchk_param *par)
 
        if (strcmp(par->table, "mangle") != 0 &&
            strcmp(par->table, "raw") != 0) {
-               pr_info("match only valid in the \'raw\' "
-                       "or \'mangle\' tables, not \'%s\'.\n", par->table);
+               pr_info_ratelimited("only valid in \'raw\' or \'mangle\' table, not \'%s\'\n",
+                                   par->table);
                return -EINVAL;
        }
 
index b12e61b7b16ce9f3f98a0906558c98803a48a9a3..ddf3111f9810d2ac4589f8db669b8ebe6e35b9a6 100644 (file)
@@ -109,8 +109,8 @@ static int rpfilter_check(const struct xt_mtchk_param *par)
 
        if (strcmp(par->table, "mangle") != 0 &&
            strcmp(par->table, "raw") != 0) {
-               pr_info("match only valid in the \'raw\' "
-                       "or \'mangle\' tables, not \'%s\'.\n", par->table);
+               pr_info_ratelimited("only valid in \'raw\' or \'mangle\' table, not \'%s\'\n",
+                                   par->table);
                return -EINVAL;
        }
 
index da56c06a443c0bcf0dd1e767b4d4848179a7ce73..6f30cd399e426f70fb46e6354d879178656cc8fb 100644 (file)
@@ -91,8 +91,8 @@ static int connsecmark_tg_check(const struct xt_tgchk_param *par)
 
        if (strcmp(par->table, "mangle") != 0 &&
            strcmp(par->table, "security") != 0) {
-               pr_info("target only valid in the \'mangle\' "
-                       "or \'security\' tables, not \'%s\'.\n", par->table);
+               pr_info_ratelimited("only valid in \'mangle\' or \'security\' table, not \'%s\'\n",
+                                   par->table);
                return -EINVAL;
        }
 
index 9faf5e050b796186b3204a02ece181726a26cb1a..5c5cd782fab5c3f93b7bd08cdb579901008c319c 100644 (file)
@@ -86,8 +86,8 @@ static int secmark_tg_check(const struct xt_tgchk_param *par)
 
        if (strcmp(par->table, "mangle") != 0 &&
            strcmp(par->table, "security") != 0) {
-               pr_info("target only valid in the \'mangle\' "
-                       "or \'security\' tables, not \'%s\'.\n", par->table);
+               pr_info_ratelimited("only valid in \'mangle\' or \'security\' table, not \'%s\'\n",
+                                   par->table);
                return -EINVAL;
        }