lkml.org 
[lkml]   [2015]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.14 09/34] netfilter: nf_tables: allow to change chain policy without hook if it exists
    Date
    3.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Pablo Neira Ayuso <pablo@netfilter.org>

    commit d6b6cb1d3e6f78d55c2d4043d77d0d8def3f3b99 upstream.

    If there's an existing base chain, we have to allow to change the
    default policy without indicating the hook information.

    However, if the chain doesn't exists, we have to enforce the presence of
    the hook attribute.

    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    net/netfilter/nf_tables_api.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    --- a/net/netfilter/nf_tables_api.c
    +++ b/net/netfilter/nf_tables_api.c
    @@ -855,7 +855,10 @@ static int nf_tables_newchain(struct soc

    if (nla[NFTA_CHAIN_POLICY]) {
    if ((chain != NULL &&
    - !(chain->flags & NFT_BASE_CHAIN)) ||
    + !(chain->flags & NFT_BASE_CHAIN)))
    + return -EOPNOTSUPP;
    +
    + if (chain == NULL &&
    nla[NFTA_CHAIN_HOOK] == NULL)
    return -EOPNOTSUPP;




    \
     
     \ /
      Last update: 2015-07-01 21:21    [W:4.096 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site