X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=extensions%2Flibipt_SAME.c;h=4eda2237723768b3ab617e5fe3baa385e1d0edf2;hb=6afea0b41dfbc3824956d11d960ad80097218feb;hp=e9c42a80e6edc2b55291bc7b27552c954529fa49;hpb=f7b70cf9e00324b89b02de213bcd0dde7044d035;p=iptables.git diff --git a/extensions/libipt_SAME.c b/extensions/libipt_SAME.c index e9c42a8..4eda223 100644 --- a/extensions/libipt_SAME.c +++ b/extensions/libipt_SAME.c @@ -7,7 +7,8 @@ #include #include #include -#include +/* For 64bit kernel / 32bit userspace */ +#include "../include/linux/netfilter_ipv4/ipt_SAME.h" /* Function which prints out usage message. */ static void @@ -42,8 +43,6 @@ init(struct ipt_entry_target *t, unsigned int *nfcache) mr->info = 0; mr->ipnum = 0; - /* Can't cache this */ - *nfcache |= NFC_UNKNOWN; } /* Parses range of IPs */ @@ -188,20 +187,19 @@ save(const struct ipt_ip *ip, const struct ipt_entry_target *target) printf("--nodst "); } -static -struct iptables_target same -= { NULL, - "SAME", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_same_info)), - IPT_ALIGN(sizeof(struct ipt_same_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_target same = { + .next = NULL, + .name = "SAME", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_same_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_same_info)), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void)