return -1;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+static int ipt_acc_checkentry(const struct xt_tgchk_param *par)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
static bool ipt_acc_checkentry(const struct xt_tgchk_param *par)
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
if (table_nr == -1) {
printk("ACCOUNT: Table insert problem. Aborting\n");
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+ return -EINVAL;
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
return false;
#else
return 0;
for every packet */
info->table_nr = table_nr;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+ /* All fine */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+ return 0;
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
return true;
#else
return 1;
}
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+static unsigned int ipt_acc_target(struct sk_buff *skb, const struct xt_action_param *par)
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
static unsigned int ipt_acc_target(struct sk_buff *skb, const struct xt_target_param *par)
#else
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24)
"IPs %pI4/%pI4\n", info->table_nr,
&src_ip, &dst_ip);
spin_unlock_bh(&ipt_acc_lock);
- return IPT_CONTINUE;
+ return XT_CONTINUE;
}
/* 8 bit network or "any" network */
ipt_acc_tables[info->table_nr].netmask,
src_ip, dst_ip, size, &ipt_acc_tables[info->table_nr].itemcount);
spin_unlock_bh(&ipt_acc_lock);
- return IPT_CONTINUE;
+ return XT_CONTINUE;
}
/* 16 bit network */
ipt_acc_tables[info->table_nr].netmask,
src_ip, dst_ip, size, &ipt_acc_tables[info->table_nr].itemcount);
spin_unlock_bh(&ipt_acc_lock);
- return IPT_CONTINUE;
+ return XT_CONTINUE;
}
/* 24 bit network */
ipt_acc_tables[info->table_nr].netmask,
src_ip, dst_ip, size, &ipt_acc_tables[info->table_nr].itemcount);
spin_unlock_bh(&ipt_acc_lock);
- return IPT_CONTINUE;
+ return XT_CONTINUE;
}
printk("ACCOUNT: ipt_acc_target: Unable to process packet. "
info->table_nr, &src_ip, &dst_ip);
spin_unlock_bh(&ipt_acc_lock);
- return IPT_CONTINUE;
+ return XT_CONTINUE;
}
/*