ipt_time support for 2.6.21
PATCH 1/1 ipt_time support for 2.6.21
Hello Fabrice,
attached is a patch to add kernel 2.6.21 support to ipt_time.
Best regards,
Thomas Jarosch
Signed-Off: Thomas Jarosch <[email protected]>
linux-2.6/net/ipv4/netfilter/ipt_time.c +15 -0
@@ -126,9 +126,16 @@ checkentry(const char *tablename,return 1 ; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) +static struct xt_match time_match = { +#else static struct ipt_match time_match = { +#endif .name = "time", .match = &match, +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21) + .family = AF_INET, +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17) .matchsize = sizeof(struct ipt_time_info), #endif
@@ -139,12 +146,20 @@ static struct ipt_match time_match = {static int __init init (void ) {printk ("ipt_time loading\n" ); +#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,21 ) +return xt_register_match (&time_match); +#else return ipt_register_match (&time_match); +#endif } static void __exit fini(void) { +#if LINUX_VERSION_CODE >=KERNEL_VERSION (2 ,6 ,21 ) +xt_unregister_match (&time_match); +#else ipt_unregister_match (&time_match); +#endif printk ("ipt_time unloaded\n" ); }
Quoted 2 lines · Thomas Jarosch
attached is a patch to add kernel 2.6.21 support to
ipt_time.
See http://lists.netfilter.org/pipermail/netfilter/2007-April/068388.html
Jan
Hello Jan,
Quoted 4 lines · Jan Engelhardt
Quoted 1 line · Thomas Jarosch
attached is a patch to add kernel 2.6.21 support to
ipt_time.See http://lists.netfilter.org/pipermail/netfilter/2007-April/068388.html
Sorry, must have missed that and it's still
unpatched in the pom download repository.
Though I prefer my patch as ipt_time continues to work with "older" 2.6.x versions like 2.6.20. There is already an #ifdef for the matchsize, so why break it now...
Cheers,
Thomas