aboutsummaryrefslogtreecommitdiff
path: root/net/netfilter/nft_osf.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netfilter/nft_osf.c')
-rw-r--r--net/netfilter/nft_osf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/netfilter/nft_osf.c b/net/netfilter/nft_osf.c
index f54d6ae15bb1..b42247aa48a9 100644
--- a/net/netfilter/nft_osf.c
+++ b/net/netfilter/nft_osf.c
@@ -61,6 +61,9 @@ static int nft_osf_init(const struct nft_ctx *ctx,
int err;
u8 ttl;
+ if (!tb[NFTA_OSF_DREG])
+ return -EINVAL;
+
if (tb[NFTA_OSF_TTL]) {
ttl = nla_get_u8(tb[NFTA_OSF_TTL]);
if (ttl > 2)