X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=extensions%2Flibipt_iprange.c;h=2ada8e278a8c64d4f7e1e85e40f1ac41f8fc1dac;hb=2e293f94e43325cb8cc719e27b43e647842c046d;hp=8445884c878ab114cff9884b66597185d4718f8c;hpb=f7b70cf9e00324b89b02de213bcd0dde7044d035;p=iptables.git diff --git a/extensions/libipt_iprange.c b/extensions/libipt_iprange.c index 8445884..2ada8e2 100644 --- a/extensions/libipt_iprange.c +++ b/extensions/libipt_iprange.c @@ -26,14 +26,6 @@ static struct option opts[] = { {0} }; -/* Initialize the match. */ -static void -init(struct ipt_entry_match *m, unsigned int *nfcache) -{ - /* Can't cache this. */ - *nfcache |= NFC_UNKNOWN; -} - static void parse_iprange(char *arg, struct ipt_iprange *range) { @@ -99,7 +91,7 @@ parse(int c, char **argv, int invert, unsigned int *flags, info->flags |= IPRANGE_DST_INV; parse_iprange(optarg, &info->dst); - *flags = 1; + break; default: @@ -173,20 +165,18 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) } } -static -struct iptables_match iprange -= { NULL, - "iprange", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_iprange_info)), - IPT_ALIGN(sizeof(struct ipt_iprange_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match iprange = { + .next = NULL, + .name = "iprange", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_iprange_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_iprange_info)), + .help = &help, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void)