netfilter 05/09: ebtables: fix inversion in match code
authorJan Engelhardt <jengelh@medozas.de>
Mon, 12 Jan 2009 00:06:06 +0000 (00:06 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jan 2009 05:18:35 +0000 (21:18 -0800)
Commit 8cc784ee (netfilter: change return types of match functions
for ebtables extensions) broke ebtables matches by inverting the
sense of match/nomatch.

Reported-by: Matt Cross <matthltc@us.ibm.com>
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/netfilter/ebtables.c

index 8a8743d7d6e77cf36ce4cec7ebe1748be158ba5f..820252aee81f1c1f59bba3cf3e666c2e494b5812 100644 (file)
@@ -79,7 +79,7 @@ static inline int ebt_do_match (struct ebt_entry_match *m,
 {
        par->match     = m->u.match;
        par->matchinfo = m->data;
-       return m->u.match->match(skb, par);
+       return m->u.match->match(skb, par) ? EBT_MATCH : EBT_NOMATCH;
 }
 
 static inline int ebt_dev_check(char *entry, const struct net_device *device)