lkml.org 
[lkml]   [2022]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 25/77] netfilter: nft_tunnel: restrict it to netdev family
    Date
    From: Pablo Neira Ayuso <pablo@netfilter.org>

    [ Upstream commit 01e4092d53bc4fe122a6e4b6d664adbd57528ca3 ]

    Only allow to use this expression from NFPROTO_NETDEV family.

    Fixes: af308b94a2a4 ("netfilter: nf_tables: add tunnel support")
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    net/netfilter/nft_tunnel.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/net/netfilter/nft_tunnel.c b/net/netfilter/nft_tunnel.c
    index 1effd4878619f..4e850c81ad8d8 100644
    --- a/net/netfilter/nft_tunnel.c
    +++ b/net/netfilter/nft_tunnel.c
    @@ -134,6 +134,7 @@ static const struct nft_expr_ops nft_tunnel_get_ops = {

    static struct nft_expr_type nft_tunnel_type __read_mostly = {
    .name = "tunnel",
    + .family = NFPROTO_NETDEV,
    .ops = &nft_tunnel_get_ops,
    .policy = nft_tunnel_policy,
    .maxattr = NFTA_TUNNEL_MAX,
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-09-02 14:43    [W:4.057 / U:0.140 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site