]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
fix deleting of time rules (SooYoun Cho) (Closes: #169)
authorHarald Welte <laforge@gnumonks.org>
Mon, 5 Jan 2004 15:42:38 +0000 (15:42 +0000)
committerHarald Welte <laforge@gnumonks.org>
Mon, 5 Jan 2004 15:42:38 +0000 (15:42 +0000)
extensions/libipt_time.c

index 909ca81df7da3b75b2096ec7c18b8be1e1e8ce74..69c35708e02bbfcc990c74719860881817523825 100644 (file)
@@ -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,