lkml.org 
[lkml]   [2009]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 28/46] netfilter: x_tables: fix match/target revision lookup
    2.6.28-stable review patch.  If anyone has any objections, please let us know.

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

    From: Patrick McHardy <kaber@trash.net>

    Upstream commit 656caff:

    Commit 55b69e91 (netfilter: implement NFPROTO_UNSPEC as a wildcard
    for extensions) broke revision probing for matches and targets that
    are registered with NFPROTO_UNSPEC.

    Fix by continuing the search on the NFPROTO_UNSPEC list if nothing
    is found on the af-specific lists.

    Signed-off-by: Patrick McHardy <kaber@trash.net>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    net/netfilter/x_tables.c | 8 ++++++++
    1 file changed, 8 insertions(+)

    --- a/net/netfilter/x_tables.c
    +++ b/net/netfilter/x_tables.c
    @@ -273,6 +273,10 @@ static int match_revfn(u8 af, const char
    have_rev = 1;
    }
    }
    +
    + if (af != NFPROTO_UNSPEC && !have_rev)
    + return match_revfn(NFPROTO_UNSPEC, name, revision, bestp);
    +
    return have_rev;
    }

    @@ -289,6 +293,10 @@ static int target_revfn(u8 af, const cha
    have_rev = 1;
    }
    }
    +
    + if (af != NFPROTO_UNSPEC && !have_rev)
    + return target_revfn(NFPROTO_UNSPEC, name, revision, bestp);
    +
    return have_rev;
    }



    \
     
     \ /
      Last update: 2009-01-23 02:27    [W:2.047 / U:0.172 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site