Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ecbf103 authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso
Browse files

netfilter: bridge: use pr ratelimiting



ebt_among still uses pr_err -- these errors indicate ebtables tool bug,
not a usage error.

Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent c82b31c5
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -187,17 +187,17 @@ static int ebt_among_mt_check(const struct xt_mtchk_param *par)
	expected_length += ebt_mac_wormhash_size(wh_src);

	if (em->match_size != EBT_ALIGN(expected_length)) {
		pr_info("wrong size: %d against expected %d, rounded to %zd\n",
		pr_err_ratelimited("wrong size: %d against expected %d, rounded to %zd\n",
				   em->match_size, expected_length,
				   EBT_ALIGN(expected_length));
		return -EINVAL;
	}
	if (wh_dst && (err = ebt_mac_wormhash_check_integrity(wh_dst))) {
		pr_info("dst integrity fail: %x\n", -err);
		pr_err_ratelimited("dst integrity fail: %x\n", -err);
		return -EINVAL;
	}
	if (wh_src && (err = ebt_mac_wormhash_check_integrity(wh_src))) {
		pr_info("src integrity fail: %x\n", -err);
		pr_err_ratelimited("src integrity fail: %x\n", -err);
		return -EINVAL;
	}
	return 0;
+2 −2
Original line number Diff line number Diff line
@@ -72,7 +72,7 @@ static int ebt_limit_mt_check(const struct xt_mtchk_param *par)
	/* Check for overflow. */
	if (info->burst == 0 ||
	    user2credits(info->avg * info->burst) < user2credits(info->avg)) {
		pr_info("overflow, try lower: %u/%u\n",
		pr_info_ratelimited("overflow, try lower: %u/%u\n",
				    info->avg, info->burst);
		return -EINVAL;
	}