]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netfilter: xtables: fix incorrect return code
authorJan Engelhardt <jengelh@medozas.de>
Sun, 2 May 2010 12:04:54 +0000 (14:04 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Sun, 2 May 2010 12:04:54 +0000 (14:04 +0200)
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
net/netfilter/xt_multiport.c

index 83b77ceb264f1d0747f13262beb375437606eac3..b21f90432247ede372447900798d87ec609f993a 100644 (file)
@@ -117,7 +117,7 @@ static int multiport_mt_check(const struct xt_mtchk_param *par)
        const struct xt_multiport_v1 *multiinfo = par->matchinfo;
 
        return check(ip->proto, ip->invflags, multiinfo->flags,
-                    multiinfo->count);
+                    multiinfo->count) ? 0 : -EINVAL;
 }
 
 static int multiport_mt6_check(const struct xt_mtchk_param *par)
@@ -126,7 +126,7 @@ static int multiport_mt6_check(const struct xt_mtchk_param *par)
        const struct xt_multiport_v1 *multiinfo = par->matchinfo;
 
        return check(ip->proto, ip->invflags, multiinfo->flags,
-                    multiinfo->count);
+                    multiinfo->count) ? 0 : -EINVAL;
 }
 
 static struct xt_match multiport_mt_reg[] __read_mostly = {