summaryrefslogtreecommitdiffstats
path: root/net/ipv4/netfilter/ipt_ecn.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-05-10 23:03:26 -0700
committerDavid S. Miller <davem@davemloft.net>2010-05-10 23:03:26 -0700
commitd250fe91ae129bff0968e685cc9c466d3a5e3482 (patch)
treee38b7628a5c6afb80c22341759f392585e558cb1 /net/ipv4/netfilter/ipt_ecn.c
parent1ae5dc342ac78d7a42965fd1f323815f6f5ef2c1 (diff)
parentb56f2d55c6c22b0c5774b3b22e336fb6cc5f4094 (diff)
downloadlinux-d250fe91ae129bff0968e685cc9c466d3a5e3482.tar.bz2
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
Diffstat (limited to 'net/ipv4/netfilter/ipt_ecn.c')
-rw-r--r--net/ipv4/netfilter/ipt_ecn.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/ipv4/netfilter/ipt_ecn.c b/net/ipv4/netfilter/ipt_ecn.c
index 2a1e56b71908..32e24100d8d1 100644
--- a/net/ipv4/netfilter/ipt_ecn.c
+++ b/net/ipv4/netfilter/ipt_ecn.c
@@ -6,7 +6,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/in.h>
#include <linux/ip.h>
#include <net/ip.h>
@@ -85,25 +85,24 @@ static bool ecn_mt(const struct sk_buff *skb, const struct xt_match_param *par)
return true;
}
-static bool ecn_mt_check(const struct xt_mtchk_param *par)
+static int ecn_mt_check(const struct xt_mtchk_param *par)
{
const struct ipt_ecn_info *info = par->matchinfo;
const struct ipt_ip *ip = par->entryinfo;
if (info->operation & IPT_ECN_OP_MATCH_MASK)
- return false;
+ return -EINVAL;
if (info->invert & IPT_ECN_OP_MATCH_MASK)
- return false;
+ return -EINVAL;
if (info->operation & (IPT_ECN_OP_MATCH_ECE|IPT_ECN_OP_MATCH_CWR) &&
ip->proto != IPPROTO_TCP) {
- printk(KERN_WARNING "ipt_ecn: can't match TCP bits in rule for"
- " non-tcp packets\n");
- return false;
+ pr_info("cannot match TCP bits in rule for non-tcp packets\n");
+ return -EINVAL;
}
- return true;
+ return 0;
}
static struct xt_match ecn_mt_reg __read_mostly = {