Skip to contentSkip to conversation

Request for maintaining "condition" and "time"

DISCUSSION Gustavo Jr. Alves 3 participants 6 messages Jul 11, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi All,

I like to request permission for maintaining the "officials" condition and time modules. Actually I´m developing a product who requires this two modules and is very important to have both up-to-date.

They are now running on linux-2.6.21, not well tested, but pretty soon will be hosted on real servers to test reliability and performance. For patch-o-matic I hosted they on
http://www.gjalves.com.br/projects/netfilter/condition and
http://www.gjalves.com.br/projects/netfilter/time.

I don´t have much experience on netfilter and patch-o-matic neither, thereof any tips or suggestions will be great appreciated.

Another thing: I really like to put both modules on mainstream kernel someday. What I need to do to accomplish this?

Thanks all

Gustavo

#1 lore raw
Quoted 4 lines · Gustavo Jr. Alves

I like to request permission for maintaining the "officials" condition and time modules. Actually I´m developing a product who requires this two modules and is very important to have both up-to-date.

time is already under 'my' hut (read: I've already changed it for 2.6.22), but I'm flexible.

ipt_time from POM-ng augmented by:

* xtables
* ipv6 support

---
 include/linux/netfilter/xt_time.h |   17 ++++
 net/netfilter/Kconfig             |   15 +++
 net/netfilter/Makefile            |    1 
 net/netfilter/xt_time.c           |  161 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 194 insertions(+)
include/linux/netfilter/xt_time.h new file +17 -0
Index: linux-2.6.22/include/linux/netfilter/xt_time.h
===================================================================
@@ -0,0 +1,17 @@
+#ifndef _XT_TIME_H
+#define _XT_TIME_H 1
+
+struct xt_time_info {
+	u_int8_t  days_match;   /* 1 bit per day. -SMTWTFS                      */
+	u_int16_t time_start;   /* 0 < time_start < 23*60+59 = 1439             */
+	u_int16_t time_stop;    /* 0:0 < time_stat < 23:59                      */
+
+				/* FIXME: Keep this one for userspace iptables binary compability: */
+	u_int8_t kerneltime;   /* ignore skb time (and use kerneltime) or not. */
+
+	time_t date_start;
+	time_t date_stop;
+};
+
+
+#endif /* _XT_TIME_H */
net/netfilter/Kconfig +15 -0
Index: linux-2.6.22/net/netfilter/Kconfig
===================================================================
@@ -712,6 +712,21 @@ config NETFILTER_XT_MATCH_TCPMSS
 
 	  To compile it as a module, choose M here.  If unsure, say N.
 
+config NETFILTER_XT_MATCH_TIME
+	tristate '"time" match support'
+	depends on NETFILTER_XTABLES
+	---help---
+	  This option adds a "time" match, which allows you to match based on
+	  the packet arrival time/date (arrival time/date at the machine which
+	  netfilter is running on) or departure time/date (for locally
+	  generated packets).
+
+	  If you say Y here, try `iptables -m time --help` for
+	  more information.
+
+	  If you want to compile it as a module, say M here and read
+	  Documentation/modules.txt. If unsure, say N.
+
 config NETFILTER_XT_MATCH_U32
 	tristate '"u32" match support'
 	depends on NETFILTER_XTABLES
net/netfilter/Makefile +1 -0
Index: linux-2.6.22/net/netfilter/Makefile
===================================================================
@@ -80,6 +80,7 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) +
 obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_layer7.o
 obj-$(CONFIG_NETFILTER_XT_MATCH_STATISTIC) += xt_statistic.o
 obj-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string.o
+obj-$(CONFIG_NETFILTER_XT_MATCH_TIME) += xt_time.o
 obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o
 obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o
 obj-$(CONFIG_NETFILTER_XT_MATCH_U32) += xt_u32.o
net/netfilter/xt_time.c new file +161 -0

161 lines not on this page · raw message

#2 lore raw

Hi Jan,

I´m really new on netfilter (this is why I asking so many dumb questions since yesterday), and I had previously understand that "time" and "condition" modules has no support at all. If you are the maintainer, sorry by asking about it. I have no intention to "steal" the projects. The same is applied to "condition" module?

Anyway, there are anything I can help? And what need to be done to pull this module on mainstream? It will be a lot of interesting if we can use this resource natively on the distributions.

Thanks

Gustavo

Quoted 9 lines · Jan Engelhardt
Quoted 4 lines · Gustavo Jr. Alves

I like to request permission for maintaining the "officials" condition and time modules. Actually I´m developing a product who requires this two modules and is very important to have both up-to-date.

time is already under 'my' hut (read: I've already changed it for 2.6.22), but I'm flexible.

#3 lore raw
Quoted 4 lines · Gustavo Jr. Alves

I´m really new on netfilter (this is why I asking so many dumb questions since yesterday), and I had previously understand that "time" and "condition" modules has no support at all.

Well, Krzysztof Oledzki <ole [at] ans.pl> is listed in the pomng db as the maintainer for the time module.

Quoted 1 line

If you are the maintainer, sorry by asking about it.

I am not :) It is just because I do (plan) to include it in my kernels too, so there was the opportunity to give ipt_time some cleaning.

Quoted 2 lines

I have no intention to "steal" the projects.
The same is applied to "condition" module?

It is a free world, you cannot "steal".

BTW,
# condition, maintained by Massimiliano Hofer <[email protected]>

Quoted 2 lines

Anyway, there are anything I can help? And what need to be done to pull this module on mainstream?

#1: Convince Patrick the module has its worth :)
#2: x_tables infrastructure
#3: IPv6, if applicable/doable
#4: Logic cleanups (as for ipt_time, I remember rants about timezone support*)

[*] Gotta dig up the url...

As for condition, I have not looked at it, and do not plan to. Feel free to "grab" it :)

Quoted 7 lines

It will be a lot of interesting if we
can use this resource natively on the distributions.

Thanks

Gustavo

Jan

#4 lore raw
Quoted 9 lines · Jan Engelhardt
Quoted 4 lines · Gustavo Jr. Alves

I´m really new on netfilter (this is why I asking so many dumb questions since yesterday), and I had previously understand that "time" and "condition" modules has no support at all.

Well, Krzysztof Oledzki <ole [at] ans.pl> is listed in the pomng db as the maintainer for the time module.

Indeed. I'm going to commit required changes today, I hope. The same for other extensions: MARK, connlimit (this would be the last time since it is going to be included into 2.6.23) and ipp2p.

So, thank you for patches and of course if someone want's to take and rewrite specific extension (like it was done with connlimit) I have no objection for that.

Best regards,

Krzysztof Olędzki

#5 lore raw
Quoted 7 lines · Krzysztof Oledzki
Quoted 3 lines · Jan Engelhardt
Quoted 1 line · Gustavo Jr. Alves
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

I´m really new on netfilter (this is why I asking so many dumb questions since yesterday), and I had previously understand that "time" and "condition" modules has no support at all.

Well, Krzysztof Oledzki <ole [at] ans.pl> is listed in the pomng db as the maintainer for the time module.

Indeed. I'm going to commit required changes today, I hope. The same for other extensions: IPMARK, connlimit (this would be the last time since it is going to be included into 2.6.23) and ipp2p.

Committed. Compile test passed. Should work with both 2.6.21 and 2.6.22 but there were many changes (especially for 2.6.22) and unfortunately I'm not able to test in until tomorrow. So, any feedback is welcome. ;)

Best regards,

Krzysztof Olędzki