diff options
author | Florian Westphal <fw@strlen.de> | 2018-02-09 09:52:04 -0500 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-02-14 15:05:36 -0500 |
commit | 7ecbf1033521194e544477377ff7e837d25f1ef3 (patch) | |
tree | 7be46915ed7b4898a5a9e666c9194b5b0c62ab10 | |
parent | c82b31c5f5608f7f069c584ac169f5691a92d3f5 (diff) |
netfilter: bridge: use pr ratelimiting
ebt_among still uses pr_err -- these errors indicate ebtables tool bug,
not a usage error.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | net/bridge/netfilter/ebt_among.c | 10 | ||||
-rw-r--r-- | net/bridge/netfilter/ebt_limit.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c index 279527f8b1fe..ce7152a12bd8 100644 --- a/net/bridge/netfilter/ebt_among.c +++ b/net/bridge/netfilter/ebt_among.c | |||
@@ -187,17 +187,17 @@ static int ebt_among_mt_check(const struct xt_mtchk_param *par) | |||
187 | expected_length += ebt_mac_wormhash_size(wh_src); | 187 | expected_length += ebt_mac_wormhash_size(wh_src); |
188 | 188 | ||
189 | if (em->match_size != EBT_ALIGN(expected_length)) { | 189 | if (em->match_size != EBT_ALIGN(expected_length)) { |
190 | pr_info("wrong size: %d against expected %d, rounded to %zd\n", | 190 | pr_err_ratelimited("wrong size: %d against expected %d, rounded to %zd\n", |
191 | em->match_size, expected_length, | 191 | em->match_size, expected_length, |
192 | EBT_ALIGN(expected_length)); | 192 | EBT_ALIGN(expected_length)); |
193 | return -EINVAL; | 193 | return -EINVAL; |
194 | } | 194 | } |
195 | if (wh_dst && (err = ebt_mac_wormhash_check_integrity(wh_dst))) { | 195 | if (wh_dst && (err = ebt_mac_wormhash_check_integrity(wh_dst))) { |
196 | pr_info("dst integrity fail: %x\n", -err); | 196 | pr_err_ratelimited("dst integrity fail: %x\n", -err); |
197 | return -EINVAL; | 197 | return -EINVAL; |
198 | } | 198 | } |
199 | if (wh_src && (err = ebt_mac_wormhash_check_integrity(wh_src))) { | 199 | if (wh_src && (err = ebt_mac_wormhash_check_integrity(wh_src))) { |
200 | pr_info("src integrity fail: %x\n", -err); | 200 | pr_err_ratelimited("src integrity fail: %x\n", -err); |
201 | return -EINVAL; | 201 | return -EINVAL; |
202 | } | 202 | } |
203 | return 0; | 203 | return 0; |
diff --git a/net/bridge/netfilter/ebt_limit.c b/net/bridge/netfilter/ebt_limit.c index 61a9f1be1263..165b9d678cf1 100644 --- a/net/bridge/netfilter/ebt_limit.c +++ b/net/bridge/netfilter/ebt_limit.c | |||
@@ -72,8 +72,8 @@ static int ebt_limit_mt_check(const struct xt_mtchk_param *par) | |||
72 | /* Check for overflow. */ | 72 | /* Check for overflow. */ |
73 | if (info->burst == 0 || | 73 | if (info->burst == 0 || |
74 | user2credits(info->avg * info->burst) < user2credits(info->avg)) { | 74 | user2credits(info->avg * info->burst) < user2credits(info->avg)) { |
75 | pr_info("overflow, try lower: %u/%u\n", | 75 | pr_info_ratelimited("overflow, try lower: %u/%u\n", |
76 | info->avg, info->burst); | 76 | info->avg, info->burst); |
77 | return -EINVAL; | 77 | return -EINVAL; |
78 | } | 78 | } |
79 | 79 | ||