Message ID | 20210802134336.065762007@linuxfoundation.org |
---|---|
State | Superseded |
Headers | show |
Series | None | expand |
diff --git a/net/netfilter/nft_nat.c b/net/netfilter/nft_nat.c index 243e8107f456..17c0f75dfcdb 100644 --- a/net/netfilter/nft_nat.c +++ b/net/netfilter/nft_nat.c @@ -147,7 +147,9 @@ static int nft_nat_init(const struct nft_ctx *ctx, const struct nft_expr *expr, alen = FIELD_SIZEOF(struct nf_nat_range, min_addr.ip6); break; default: - return -EAFNOSUPPORT; + if (tb[NFTA_NAT_REG_ADDR_MIN]) + return -EAFNOSUPPORT; + break; } priv->family = family;