netfilter: xtables: consolidate code into xt_request_find_match
[safe/jmp/linux-2.6] / net / netfilter / xt_dscp.c
index 0280d3a..6ecedc1 100644 (file)
@@ -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/module.h>
 #include <linux/skbuff.h>
 #include <linux/ip.h>
@@ -47,7 +47,7 @@ static bool dscp_mt_check(const struct xt_mtchk_param *par)
        const struct xt_dscp_info *info = par->matchinfo;
 
        if (info->dscp > XT_DSCP_MAX) {
-               printk(KERN_ERR "xt_dscp: dscp %x out of range\n", info->dscp);
+               pr_info("dscp %x out of range\n", info->dscp);
                return false;
        }
 
@@ -58,7 +58,7 @@ static bool tos_mt(const struct sk_buff *skb, const struct xt_match_param *par)
 {
        const struct xt_tos_match_info *info = par->matchinfo;
 
-       if (par->match->family == NFPROTO_IPV4)
+       if (par->family == NFPROTO_IPV4)
                return ((ip_hdr(skb)->tos & info->tos_mask) ==
                       info->tos_value) ^ !!info->invert;
        else