projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86/smpboot: Init apic mapping before usage
[cascardo/linux.git]
/
net
/
netfilter
/
nft_reject_inet.c
diff --git
a/net/netfilter/nft_reject_inet.c
b/net/netfilter/nft_reject_inet.c
index
759ca52
..
e79d9ca
100644
(file)
--- a/
net/netfilter/nft_reject_inet.c
+++ b/
net/netfilter/nft_reject_inet.c
@@
-66,7
+66,11
@@
static int nft_reject_inet_init(const struct nft_ctx *ctx,
const struct nlattr * const tb[])
{
struct nft_reject *priv = nft_expr_priv(expr);
const struct nlattr * const tb[])
{
struct nft_reject *priv = nft_expr_priv(expr);
- int icmp_code;
+ int icmp_code, err;
+
+ err = nft_reject_validate(ctx, expr, NULL);
+ if (err < 0)
+ return err;
if (tb[NFTA_REJECT_TYPE] == NULL)
return -EINVAL;
if (tb[NFTA_REJECT_TYPE] == NULL)
return -EINVAL;
@@
-124,6
+128,7
@@
static const struct nft_expr_ops nft_reject_inet_ops = {
.eval = nft_reject_inet_eval,
.init = nft_reject_inet_init,
.dump = nft_reject_inet_dump,
.eval = nft_reject_inet_eval,
.init = nft_reject_inet_init,
.dump = nft_reject_inet_dump,
+ .validate = nft_reject_validate,
};
static struct nft_expr_type nft_reject_inet_type __read_mostly = {
};
static struct nft_expr_type nft_reject_inet_type __read_mostly = {