Merge branch 'gpio/merge' of git://git.secretlab.ca/git/linux-2.6
[firefly-linux-kernel-4.4.55.git] / net / netfilter / xt_physdev.c
index 3d42a278408f7bdc80a5a27d48ee3c1ed0e11c89..d7ca16b8b8dfbcd8dec7c7ab67f9d6e5c3f957d9 100644 (file)
@@ -22,7 +22,7 @@ MODULE_ALIAS("ip6t_physdev");
 
 
 static bool
-physdev_mt(const struct sk_buff *skb, const struct xt_match_param *par)
+physdev_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
        const struct xt_physdev_info *info = par->matchinfo;
@@ -83,13 +83,13 @@ match_outdev:
        return (!!ret ^ !(info->invert & XT_PHYSDEV_OP_OUT));
 }
 
-static bool physdev_mt_check(const struct xt_mtchk_param *par)
+static int physdev_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_physdev_info *info = par->matchinfo;
 
        if (!(info->bitmask & XT_PHYSDEV_OP_MASK) ||
            info->bitmask & ~XT_PHYSDEV_OP_MASK)
-               return false;
+               return -EINVAL;
        if (info->bitmask & XT_PHYSDEV_OP_OUT &&
            (!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) ||
             info->invert & XT_PHYSDEV_OP_BRIDGED) &&
@@ -99,9 +99,9 @@ static bool physdev_mt_check(const struct xt_mtchk_param *par)
                        "POSTROUTING chains for non-bridged traffic is not "
                        "supported anymore.\n");
                if (par->hook_mask & (1 << NF_INET_LOCAL_OUT))
-                       return false;
+                       return -EINVAL;
        }
-       return true;
+       return 0;
 }
 
 static struct xt_match physdev_mt_reg __read_mostly = {