]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
payload: fix crash when wrong ethernet protocol type is used
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 15 Jan 2014 20:19:02 +0000 (21:19 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 16 Jan 2014 09:05:21 +0000 (10:05 +0100)
nft add rule ip filter output meta protocol xyz counter
                                            ^^^

This fix is similar to 4097ad7 ("meta: fix crash when parsing
unresolvable mark values").

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/payload.c

index 86d75fa580f31b9bc4a6cd00641f8b50036e9258..decfcd61a9b088bd765429f74e3d1de2d0c8e1d6 100644 (file)
@@ -993,6 +993,7 @@ static struct error_record *ethertype_parse(const struct expr *sym,
 {
        struct error_record *erec;
 
+       *res = NULL;
        erec = sym->dtype->basetype->parse(sym, res);
        if (erec != NULL)
                return erec;