summaryrefslogtreecommitdiff
path: root/net/netfilter/nft_rt.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2024-02-19 16:58:41 +0000
committerMark Brown <broonie@kernel.org>2024-02-19 16:58:41 +0000
commitd68ce3aa8142333a96a071a9a0207f21c04e54cc (patch)
tree15754707ec571eb08c8d6308fe2459e46b8a5468 /net/netfilter/nft_rt.c
parentec29a4d9b7c7329afc61e7932cb91e9b292b2b74 (diff)
parentb401b621758e46812da61fa58a67c3fd8d91de0d (diff)
regulator: Merge up v6.8-rc5
There are dependencies on the PWM fixes for some new work on the PWM driver.
Diffstat (limited to 'net/netfilter/nft_rt.c')
-rw-r--r--net/netfilter/nft_rt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/netfilter/nft_rt.c b/net/netfilter/nft_rt.c
index 35a2c28caa60..24d977138572 100644
--- a/net/netfilter/nft_rt.c
+++ b/net/netfilter/nft_rt.c
@@ -166,6 +166,11 @@ static int nft_rt_validate(const struct nft_ctx *ctx, const struct nft_expr *exp
const struct nft_rt *priv = nft_expr_priv(expr);
unsigned int hooks;
+ if (ctx->family != NFPROTO_IPV4 &&
+ ctx->family != NFPROTO_IPV6 &&
+ ctx->family != NFPROTO_INET)
+ return -EOPNOTSUPP;
+
switch (priv->key) {
case NFT_RT_NEXTHOP4:
case NFT_RT_NEXTHOP6: