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

Commit 09e4e42a authored by Pablo Neira Ayuso's avatar Pablo Neira Ayuso
Browse files

netfilter: nft_limit: rename to nft_limit_pkts



To prepare introduction of bytes ratelimit support.

Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent d877f071
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -26,7 +26,7 @@ struct nft_limit {
	unsigned long	stamp;
	unsigned long	stamp;
};
};


static void nft_limit_eval(const struct nft_expr *expr,
static void nft_limit_pkts_eval(const struct nft_expr *expr,
				struct nft_regs *regs,
				struct nft_regs *regs,
				const struct nft_pktinfo *pkt)
				const struct nft_pktinfo *pkt)
{
{
@@ -85,17 +85,17 @@ static int nft_limit_dump(struct sk_buff *skb, const struct nft_expr *expr)
}
}


static struct nft_expr_type nft_limit_type;
static struct nft_expr_type nft_limit_type;
static const struct nft_expr_ops nft_limit_ops = {
static const struct nft_expr_ops nft_limit_pkts_ops = {
	.type		= &nft_limit_type,
	.type		= &nft_limit_type,
	.size		= NFT_EXPR_SIZE(sizeof(struct nft_limit)),
	.size		= NFT_EXPR_SIZE(sizeof(struct nft_limit)),
	.eval		= nft_limit_eval,
	.eval		= nft_limit_pkts_eval,
	.init		= nft_limit_init,
	.init		= nft_limit_init,
	.dump		= nft_limit_dump,
	.dump		= nft_limit_dump,
};
};


static struct nft_expr_type nft_limit_type __read_mostly = {
static struct nft_expr_type nft_limit_type __read_mostly = {
	.name		= "limit",
	.name		= "limit",
	.ops		= &nft_limit_ops,
	.ops		= &nft_limit_pkts_ops,
	.policy		= nft_limit_policy,
	.policy		= nft_limit_policy,
	.maxattr	= NFTA_LIMIT_MAX,
	.maxattr	= NFTA_LIMIT_MAX,
	.flags		= NFT_EXPR_STATEFUL,
	.flags		= NFT_EXPR_STATEFUL,