netfilter: xtables: change matches to return error code
[safe/jmp/linux-2.6] / net / ipv4 / netfilter / ip_tables.c
index 771ffa7..18c5b15 100644 (file)
@@ -2181,7 +2181,7 @@ static int icmp_checkentry(const struct xt_mtchk_param *par)
        const struct ipt_icmp *icmpinfo = par->matchinfo;
 
        /* Must specify no unknown invflags */
-       return !(icmpinfo->invflags & ~IPT_ICMP_INV);
+       return (icmpinfo->invflags & ~IPT_ICMP_INV) ? -EINVAL : 0;
 }
 
 /* The built-in targets: standard (NULL) and error. */