X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=extensions%2Flibipt_length.c;h=cfac1c5ff78a147d90f43782bc089d73017f9443;hb=35903a74cae89aa0e6d07d43ecd4bca4e7524903;hp=8ac98b624c578eae89ebc608fccb5d95fa00eaa6;hpb=f7b70cf9e00324b89b02de213bcd0dde7044d035;p=iptables.git diff --git a/extensions/libipt_length.c b/extensions/libipt_length.c index 8ac98b6..cfac1c5 100644 --- a/extensions/libipt_length.c +++ b/extensions/libipt_length.c @@ -25,13 +25,6 @@ static struct option opts[] = { {0} }; -/* Initialize the match. */ -static void -init(struct ipt_entry_match *m, unsigned int *nfcache) -{ - *nfcache |= NFC_UNKNOWN; -} - static u_int16_t parse_length(const char *s) { @@ -138,20 +131,18 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) print_length((struct ipt_length_info *)match->data); } -static -struct iptables_match length -= { NULL, - "length", - IPTABLES_VERSION, - IPT_ALIGN(sizeof(struct ipt_length_info)), - IPT_ALIGN(sizeof(struct ipt_length_info)), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +static struct iptables_match length = { + .next = NULL, + .name = "length", + .version = IPTABLES_VERSION, + .size = IPT_ALIGN(sizeof(struct ipt_length_info)), + .userspacesize = IPT_ALIGN(sizeof(struct ipt_length_info)), + .help = &help, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts }; void _init(void)