0/3 pom expire
PATCH 1/1 0/3 pom expire
this series of patches fixes a bug in the rule deletion portion of the expire match in patch-o-matic. also included in this patch is the addition of an option to delay rule deletion once a rule has expired, better time parsing, and general code cleanup (for better adherence to the recommended kernel coding style).
I think there's a race condition if two entries expire at the same time, so this is definitely still a work in progress, I'll tackle that bug next. at some point, we should discuss the alternate implementation suggested, that is, if anyone actually starts using this module.
Cheers,
Bryan Cardillo
help | 4 iptables/extensions/libip6t_expire.c | 233 +++++++++++++++++++-------------- iptables/extensions/libip6t_expire.man | 11 + iptables/extensions/libipt_expire.c | 233 +++++++++++++++++++-------------- iptables/extensions/libipt_expire.man | 11 + 5 files changed, 302 insertions(+), 190 deletions(-)
expire/help +2 -2
@@ -2,7 +2,7 @@ your iptables ruleset which will later be removed automatically. Usage: - -m expire --expiration [time] + -m expire --expires [time] Example: - iptables ... -m expire --expiration +30 ... + iptables ... -m expire --expires 30s ...
expire/iptables/extensions/libip6t_expire.man +10 -1
@@ -1,5 +1,14 @@ This module matches until its expiration time. .TP -.BI "--expiration " "[\fItime\fP]" +.BI "--expires " "[\fItime\fP]" Match against the other rule criteria until the expiration time. After the expiration time, the entire rule will be removed from the table. +.TP +.BI "--delay " "[\fItime\fP]" +Delay the deletion of the rule for the specified time. + +Times may be specified as absolute times of the format MMDDhhmmss[YYYY], +or as relative using an integer and optional units. The following +units are recognized: \fIyears\fP (year, y), \fImonths\fP (month, mon), +\fIweeks\fP (week, w), \fIdays\fP (day, d), \fIhours\fP (hour, h), +\fIminutes\fP (min, m), \fIseconds\fP (sec, s).
expire/iptables/extensions/libipt_expire.c +140 -93
290 lines not on this page · raw message
expire/iptables/extensions/libip6t_expire.c +140 -93
290 lines not on this page · raw message
expire/iptables/extensions/libipt_expire.man +10 -1
@@ -1,5 +1,14 @@ This module matches until its expiration time. .TP -.BI "--expiration " "[\fItime\fP]" +.BI "--expires " "[\fItime\fP]" Match against the other rule criteria until the expiration time. After the expiration time, the entire rule will be removed from the table. +.TP +.BI "--delay " "[\fItime\fP]" +Delay the deletion of the rule for the specified time. + +Times may be specified as absolute times of the format MMDDhhmmss[YYYY], +or as relative using an integer and optional units. The following +units are recognized: \fIyears\fP (year, y), \fImonths\fP (month, mon), +\fIweeks\fP (week, w), \fIdays\fP (day, d), \fIhours\fP (hour, h), +\fIminutes\fP (min, m), \fIseconds\fP (sec, s).
Re: [PATCH] 1/3 pom expire
linux-2.6.10/include/linux/netfilter_ipv4/ipt_expire.h | 3 linux-2.6.10/net/ipv4/netfilter/ipt_expire.c | 705 ++++++++--------- linux-2.6/include/linux/netfilter_ipv4/ipt_expire.h | 3 linux-2.6/net/ipv4/netfilter/ipt_expire.c | 705 ++++++++--------- 4 files changed, 678 insertions(+), 738 deletions(-)
expire/linux-2.6.10/include/linux/netfilter_ipv4/ipt_expire.h +2 -1
@@ -26,7 +26,8 @@#include <linux/types.h> struct ipt_exp_info { -time_t expiration; +time_t expires; +time_t delay; };#endif
expire/linux-2.6/include/linux/netfilter_ipv4/ipt_expire.h +2 -1
@@ -26,7 +26,8 @@#include <linux/types.h> struct ipt_exp_info { -time_t expiration; +time_t expires; +time_t delay; };#endif
expire/linux-2.6.10/net/ipv4/netfilter/ipt_expire.c +337 -368
815 lines not on this page · raw message
expire/linux-2.6/net/ipv4/netfilter/ipt_expire.c +337 -368
815 lines not on this page · raw message
Re: [PATCH] 2/3 pom expire
In reply to Bryan Cardilloin case my initial warning about this being a work in progress was not enough, there's an off-by-one bug in my patch numbering scheme, sorry, just not my day... should have been 1,2, and 3 of 3 (or 0, 1, and 2 of 2).
--Bryan
linux-2.6.10/include/linux/netfilter_ipv6/ip6t_expire.h | 3 linux-2.6.10/net/ipv6/netfilter/ip6t_expire.c | 725 +++++++--------- linux-2.6/include/linux/netfilter_ipv6/ip6t_expire.h | 3 linux-2.6/net/ipv6/netfilter/ip6t_expire.c | 725 +++++++--------- 4 files changed, 694 insertions(+), 762 deletions(-)
expire/linux-2.6.10/include/linux/netfilter_ipv6/ip6t_expire.h +2 -1
@@ -26,7 +26,8 @@#include <linux/types.h> struct ip6t_exp_info { -time_t expiration; +time_t expires; +time_t delay; };#endif
expire/linux-2.6/include/linux/netfilter_ipv6/ip6t_expire.h +2 -1
@@ -26,7 +26,8 @@#include <linux/types.h> struct ip6t_exp_info { -time_t expiration; +time_t expires; +time_t delay; };#endif
expire/linux-2.6.10/net/ipv6/netfilter/ip6t_expire.c +345 -380
853 lines not on this page · raw message
expire/linux-2.6/net/ipv6/netfilter/ip6t_expire.c +345 -380
853 lines not on this page · raw message