]> Pileus Git - ~andy/linux/blobdiff - net/netfilter/xt_esp.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[~andy/linux] / net / netfilter / xt_esp.c
index f9deecbef875b31882a5f12defb077d1b68ed3c2..171ba82b5902095202d72705fd0ec00906e241b8 100644 (file)
@@ -29,14 +29,14 @@ static inline bool
 spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert)
 {
        bool r;
-       pr_debug("esp spi_match:%c 0x%x <= 0x%x <= 0x%x\n",
+       pr_debug("spi_match:%c 0x%x <= 0x%x <= 0x%x\n",
                 invert ? '!' : ' ', min, spi, max);
        r = (spi >= min && spi <= max) ^ invert;
        pr_debug(" result %s\n", r ? "PASS" : "FAILED");
        return r;
 }
 
-static bool esp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
+static bool esp_mt(const struct sk_buff *skb, struct xt_action_param *par)
 {
        const struct ip_esp_hdr *eh;
        struct ip_esp_hdr _esp;
@@ -52,7 +52,7 @@ static bool esp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                 * can't.  Hence, no choice but to drop.
                 */
                pr_debug("Dropping evil ESP tinygram.\n");
-               *par->hotdrop = true;
+               par->hotdrop = true;
                return false;
        }
 
@@ -60,16 +60,16 @@ static bool esp_mt(const struct sk_buff *skb, const struct xt_match_param *par)
                         !!(espinfo->invflags & XT_ESP_INV_SPI));
 }
 
-static bool esp_mt_check(const struct xt_mtchk_param *par)
+static int esp_mt_check(const struct xt_mtchk_param *par)
 {
        const struct xt_esp *espinfo = par->matchinfo;
 
        if (espinfo->invflags & ~XT_ESP_INV_MASK) {
                pr_debug("unknown flags %X\n", espinfo->invflags);
-               return false;
+               return -EINVAL;
        }
 
-       return true;
+       return 0;
 }
 
 static struct xt_match esp_mt_reg[] __read_mostly = {