From: Harald Welte Date: Mon, 5 Jan 2004 15:42:38 +0000 (+0000) Subject: fix deleting of time rules (SooYoun Cho) (Closes: #169) X-Git-Tag: v1.3.0-rc1~149 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a753811078b056d7c394f420af4e6bed72a16126;p=thirdparty%2Fiptables.git fix deleting of time rules (SooYoun Cho) (Closes: #169) --- diff --git a/extensions/libipt_time.c b/extensions/libipt_time.c index 909ca81d..69c35708 100644 --- a/extensions/libipt_time.c +++ b/extensions/libipt_time.c @@ -291,13 +291,15 @@ save(const struct ipt_ip *ip, const struct ipt_entry_match *match) printf(" "); } +/* have to use offsetof() instead of IPT_ALIGN(), since kerneltime must not + * be compared when user deletes rule with '-D' */ static struct iptables_match timestruct = { NULL, "time", IPTABLES_VERSION, IPT_ALIGN(sizeof(struct ipt_time_info)), - IPT_ALIGN(sizeof(struct ipt_time_info)), + offsetof(struct ipt_time_info, kerneltime), &help, &init, &parse,