[TIPC]: fix tipc_link_create error handling
[powerpc.git] / net / netfilter / xt_physdev.c
index 70de670..a4bab04 100644 (file)
@@ -13,7 +13,6 @@
 #include <linux/netfilter_bridge.h>
 #include <linux/netfilter/xt_physdev.h>
 #include <linux/netfilter/x_tables.h>
-#include <linux/netfilter_bridge.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Bart De Schuymer <bdschuym@pandora.be>");
@@ -36,7 +35,7 @@ match(const struct sk_buff *skb,
        const struct xt_physdev_info *info = matchinfo;
        bool ret;
        const char *indev, *outdev;
-       struct nf_bridge_info *nf_bridge;
+       const struct nf_bridge_info *nf_bridge;
 
        /* Not a bridged IP packet or no info available yet:
         * LOCAL_OUT/mangle and LOCAL_OUT/nat don't know if
@@ -99,7 +98,7 @@ match_outdev:
        return ret ^ !(info->invert & XT_PHYSDEV_OP_OUT);
 }
 
-static int
+static bool
 checkentry(const char *tablename,
                       const void *ip,
                       const struct xt_match *match,
@@ -110,7 +109,7 @@ checkentry(const char *tablename,
 
        if (!(info->bitmask & XT_PHYSDEV_OP_MASK) ||
            info->bitmask & ~XT_PHYSDEV_OP_MASK)
-               return 0;
+               return false;
        if (info->bitmask & XT_PHYSDEV_OP_OUT &&
            (!(info->bitmask & XT_PHYSDEV_OP_BRIDGED) ||
             info->invert & XT_PHYSDEV_OP_BRIDGED) &&
@@ -120,12 +119,12 @@ checkentry(const char *tablename,
                       "OUTPUT, FORWARD and POSTROUTING chains for non-bridged "
                       "traffic is not supported anymore.\n");
                if (hook_mask & (1 << NF_IP_LOCAL_OUT))
-                       return 0;
+                       return false;
        }
-       return 1;
+       return true;
 }
 
-static struct xt_match xt_physdev_match[] = {
+static struct xt_match xt_physdev_match[] __read_mostly = {
        {
                .name           = "physdev",
                .family         = AF_INET,