bring ct_sync up-to-date with 2.4.30
PATCH 1/1 bring ct_sync up-to-date with 2.4.30
Hi,
I played around with ct_sync this weekend, and got it to work with a 2.4.30 kernel. I have created an update patch for the current svn repository and would be happy if someone could review this and, if the patch looks ok, apply it. Thanks!
Regards,
Filip
README +22 -17
@@ -91,23 +91,23 @@ for your favourite Linux distribution (Debian testing/unstable includes quilt, for example.) -The next step is to unpack a vanilla kernel source (2.4.26 in our case), +The next step is to unpack a vanilla kernel source (2.4.30 in our case), and make two directories for quilt: '.pc' and 'patches': -hidden@nienna:patchtree$ tar xjf linux-2.4.26.tar.bz2 && cd linux-2.4.26 -hidden@nienna:linux-2.4.26$ mkdir .pc patches +hidden@nienna:patchtree$ tar xjf linux-2.4.30.tar.bz2 && cd linux-2.4.30 +hidden@nienna:linux-2.4.30$ mkdir .pc patches -The you should copy the contents of the 'patches' directory of the CVS +Then you should copy the contents of the 'patches' directory of the CVS module to the 'patches' directory you've just created inside the kernel sources: -hidden@nienna:linux-2.4.26$ cp ~/cvs/netfilter/netfilter-ha/patches/* \ +hidden@nienna:linux-2.4.30$ cp ~/cvs/netfilter/netfilter-ha/patches/* \ patches/ At this point, quilt should know everything about the patches to be applied. You can easily test this: -hidden@nienna:linux-2.4.26$ quilt unapplied +hidden@nienna:linux-2.4.30$ quilt unapplied raw pf_packet pf_packet_remove_warning
@@ -122,10 +122,12 @@ export_ip_nat_lock export_ip_nat_hash ct_sync_config_and_makefile +seq_file-seq_start_token +ip_conntrack_irc_lockfix To apply all those patches, type: -hidden@nienna:linux-2.4.26$ quilt push -a +hidden@nienna:linux-2.4.30$ quilt push -a NOTE: the patchtree contains a few other useful goodies as well, which are not strictly needed by ct_sync. There are kgdb 1.9, connection marks, and
@@ -139,10 +141,10 @@ two lines): # First, we create the a new patch, which will contain our addon files -hidden@nienna:linux-2.4.26$ quilt new ct_sync.patch +hidden@nienna:linux-2.4.30$ quilt new ct_sync.patch Patch ct_sync is now on top # We name those files _before_ copying them to the tree -hidden@nienna:linux-2.4.26$ quilt add include/linux/netfilter_ipv4/\ +hidden@nienna:linux-2.4.30$ quilt add include/linux/netfilter_ipv4/\ > {cts_buff.h,ct_sync.h,ct_sync_main.h,ct_sync_proto.h,ct_sync_sock.h} File include/linux/netfilter_ipv4/cts_buff.h added to patch ct_sync File include/linux/netfilter_ipv4/ct_sync.h added to patch ct_sync
@@ -150,18 +152,18 @@ File include/linux/netfilter_ipv4/ct_sync_proto.h added to patch ct_sync File include/linux/netfilter_ipv4/ct_sync_sock.h added to patch ct_sync # Add C source files -hidden@nienna:linux-2.4.26$ quilt add net/ipv4/netfilter/\ +hidden@nienna:linux-2.4.30$ quilt add net/ipv4/netfilter/\ > {ct_sync_main.c,ct_sync_proto.c,ct_sync_sock.c} File net/ipv4/netfilter/ct_sync_main.c added to patch ct_sync File net/ipv4/netfilter/ct_sync_proto.c added to patch ct_sync File net/ipv4/netfilter/ct_sync_sock.c added to patch ct_sync # Copy those files -hidden@nienna:linux-2.4.26$ cp ~/cvs/netfilter/netfilter-ha/ct_sync/*.h\ +hidden@nienna:linux-2.4.30$ cp ~/cvs/netfilter/netfilter-ha/ct_sync/*.h\ > include/linux/netfilter_ipv4 -hidden@nienna:linux-2.4.26$ cp ~/cvs/netfilter/netfilter-ha/ct_sync/*.c\ +hidden@nienna:linux-2.4.30$ cp ~/cvs/netfilter/netfilter-ha/ct_sync/*.c\ > net/ipv4/netfilter/ # Refresh our quilt patch -hidden@nienna:linux-2.4.26$ quilt refresh +hidden@nienna:linux-2.4.30$ quilt refresh OK, we are ready. Now run your favourite configuration tool, and enable the following options under Networking options/Netfilter configuration:
@@ -230,6 +232,9 @@ care of is giving the correct module parameters when loading ct_sync. The possible parameters are the following: + - cmarkbit: bit in the connection mark to use as sync mark. All traffic + marked with this bit will be synced. + - syncdev: the name of the Ethernet interface connected to the dedicated replication network. This interface must not be used for other purposes.
@@ -253,10 +258,10 @@ 6. Initiating state transitions using the /proc interface --------------------------------------------------------- -ct_sync creates a file in /proc/net, which contains 0 if the current state -of the node is slave, and 1 if it is master. Transitions can be initiated -by writing the appropriate value into this file, for example to set the -node to master state you need to issue the following command: +ct_sync creates a file in /proc/sys/net, which contains 0 if the current +state of the node is slave, and 1 if it is master. Transitions can be +initiated by writing the appropriate value into this file, for example to +set the node to master state you need to issue the following command: # echo 1 > /proc/sys/net/ipv4/netfilter/ct_sync/state
ct_sync/ct_sync_main.c +1 -1
@@ -1842,7 +1842,7 @@ goto error_hook1;if (nf_register_hook (&cts_hook_ops[3 ]) <0 ) goto error_hook2; -ip_ct_selective_cleanup (kill_all,NULL ); +ip_ct_iterate_cleanup (kill_all,NULL ); }/* register sysctl entries */
patches/connmark.patch +3 -3
@@ -228,7 +228,7 @@ dep_tristate ' Connection tracking match support' CONFIG_IP_NF_MATCH_CONNTRACK $CONFIG_IP_NF_CONNTRACK $CONFIG_IP_NF_IPTABLES fi if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then -@@ -106,6 +110,9 @@ +@@ -105,6 +107,9 @@ dep_tristate ' MARK target support' CONFIG_IP_NF_TARGET_MARK $CONFIG_IP_NF_MANGLE fi dep_tristate ' LOG target support' CONFIG_IP_NF_TARGET_LOG $CONFIG_IP_NF_IPTABLES
@@ -350,7 +350,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-14 14:52:11.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-28 12:58:18.000000000 +0200 -@@ -735,6 +735,9 @@ +@@ -743,6 +743,9 @@ __set_bit(IPS_EXPECTED_BIT, &conntrack->status); conntrack->master = expected; expected->sibling = conntrack;
@@ -364,7 +364,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/Documentation/Configure.help 2004-06-14 14:52:11.000000000 +0200 +++ linux-2.4.26-ct_sync/Documentation/Configure.help 2004-06-28 12:58:18.000000000 +0200 -@@ -2803,6 +2803,32 @@ +@@ -2850,6 +2850,32 @@ If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say `Y'.
patches/export_ct_id.patch +2 -2
@@ -17,7 +17,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-28 12:58:30.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-07-06 15:14:39.000000000 +0200 -@@ -534,6 +534,8 @@ +@@ -538,6 +538,8 @@ EXPORT_SYMBOL(ip_conntrack_lock); EXPORT_SYMBOL(ip_conntrack_hash); EXPORT_SYMBOL_GPL(hash_conntrack);
@@ -30,7 +30,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-28 12:58:30.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_core.c 2004-07-06 15:13:50.000000000 +0200 -@@ -72,8 +72,8 @@ +@@ -73,8 +73,8 @@ /* for ctnetlink */ LIST_HEAD(ip_conntrack_ordered_list);
patches/export_hash_conntrack.patch +2 -2
@@ -15,7 +15,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-28 12:56:25.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-28 12:56:29.000000000 +0200 -@@ -533,6 +533,7 @@ +@@ -537,6 +537,7 @@ EXPORT_SYMBOL(ip_conntrack_ordered_list); EXPORT_SYMBOL(ip_conntrack_lock); EXPORT_SYMBOL(ip_conntrack_hash);
@@ -27,7 +27,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-28 12:56:25.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-28 12:56:29.000000000 +0200 -@@ -123,7 +123,7 @@ +@@ -124,7 +124,7 @@ static int ip_conntrack_hash_rnd_initted; static unsigned int ip_conntrack_hash_rnd;
patches/export_ip_conntrack_find.patch +2 -2
@@ -18,7 +18,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-28 12:56:18.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-28 12:56:25.000000000 +0200 -@@ -536,6 +536,7 @@ +@@ -540,6 +540,7 @@ EXPORT_SYMBOL(ip_conntrack_untracked); EXPORT_SYMBOL_GPL(ip_conntrack_find_get); EXPORT_SYMBOL_GPL(__ip_conntrack_find_get);
@@ -30,7 +30,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-28 12:56:18.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_core.c 2004-06-28 12:56:25.000000000 +0200 -@@ -414,7 +414,7 @@ +@@ -421,7 +421,7 @@ && ip_ct_tuple_equal(tuple, &i->tuple); }
patches/export_ip_conntrack_helpers.patch +12 -10
@@ -14,7 +14,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-28 12:56:01.000000000 +0200 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_standalone.c 2004-06-28 12:56:18.000000000 +0200 -@@ -537,6 +537,7 @@ +@@ -541,6 +541,7 @@ EXPORT_SYMBOL_GPL(ip_conntrack_find_get); EXPORT_SYMBOL_GPL(__ip_conntrack_find_get); EXPORT_SYMBOL_GPL(ip_conntrack_put);
@@ -35,7 +35,7 @@ unsigned int ip_conntrack_htable_size = 0; int ip_conntrack_max = 0; static atomic_t ip_conntrack_count = ATOMIC_INIT(0); -@@ -693,7 +693,7 @@ +@@ -702,7 +702,7 @@ struct ip_conntrack_helper *ip_ct_find_helper(const struct ip_conntrack_tuple *tuple) {
@@ -44,16 +44,18 @@ struct ip_conntrack_helper *, tuple); } -@@ -1217,7 +1217,7 @@ +@@ -1230,7 +1230,9 @@ conntrack->tuplehash[IP_CT_DIR_REPLY].tuple = *newreply; - if (!conntrack->master) -- conntrack->helper = LIST_FIND(&helpers, helper_cmp, + if (!conntrack->master && list_empty(&conntrack->sibling_list)) +- conntrack->helper = ip_ct_find_helper(newreply); + conntrack->helper = LIST_FIND(&ip_conntrack_helpers, helper_cmp, - struct ip_conntrack_helper *, - newreply); ++ struct ip_conntrack_helper *, ++ newreply); WRITE_UNLOCK(&ip_conntrack_lock); -@@ -1230,7 +1230,7 @@ + + return 1; +@@ -1241,7 +1241,7 @@ MOD_INC_USE_COUNT; WRITE_LOCK(&ip_conntrack_lock);
@@ -62,7 +64,7 @@ WRITE_UNLOCK(&ip_conntrack_lock); return 0; -@@ -1255,7 +1255,7 @@ +@@ -1266,7 +1266,7 @@ /* Need write lock here, to delete helper. */ WRITE_LOCK(&ip_conntrack_lock);
@@ -70,4 +72,4 @@ + LIST_DELETE(&ip_conntrack_helpers, me); /* Get rid of expecteds, set helpers to NULL. */ - for (i = 0; i < ip_conntrack_htable_size; i++) + LIST_FIND_W(&unconfirmed, unhelp, struct ip_conntrack_tuple_hash*, me);
patches/export_ip_nat_hash.patch +1 -1
@@ -2,7 +2,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_nat_standalone.c Mon Jun 14 15:08:55 2004 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_nat_standalone.c Mon Jun 14 15:08:58 2004 -@@ -363,4 +363,6 @@ +@@ -367,4 +367,6 @@ EXPORT_SYMBOL(ip_nat_used_tuple); EXPORT_SYMBOL_GPL(ip_nat_helpers); EXPORT_SYMBOL_GPL(ip_nat_lock);
patches/export_ip_nat_helpers.patch +2 -2
@@ -12,7 +12,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_nat_standalone.c Wed Apr 14 15:05:41 2004 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_nat_standalone.c Mon Jun 14 15:08:42 2004 -@@ -361,4 +361,5 @@ +@@ -365,4 +365,5 @@ EXPORT_SYMBOL(ip_nat_mangle_tcp_packet); EXPORT_SYMBOL(ip_nat_mangle_udp_packet); EXPORT_SYMBOL(ip_nat_used_tuple);
@@ -31,7 +31,7 @@ extern struct ip_nat_protocol unknown_nat_protocol; -@@ -636,7 +636,7 @@ +@@ -629,7 +629,7 @@ /* If there's a helper, assign it; based on new tuple. */ if (!conntrack->master)
patches/export_ip_nat_lock.patch +1 -1
@@ -2,7 +2,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_nat_standalone.c Mon Jun 14 15:08:42 2004 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_nat_standalone.c Mon Jun 14 15:08:55 2004 -@@ -362,4 +362,5 @@ +@@ -366,4 +366,5 @@ EXPORT_SYMBOL(ip_nat_mangle_udp_packet); EXPORT_SYMBOL(ip_nat_used_tuple); EXPORT_SYMBOL_GPL(ip_nat_helpers);
patches/ip_conntrack_irc_lockfix.patch +20 -0
@@ -0,0 +1,20 @@ +Netfilter ip_conntrack_irc lockfix patch + +%patch +Index: linux-2.4.30-ctsync/net/ipv4/netfilter/ip_conntrack_irc.c +=================================================================== +--- linux-2.4.30-ctsync.orig/net/ipv4/netfilter/ip_conntrack_irc.c 2005-05-21 06:42:23.000000000 +0200 ++++ linux-2.4.30-ctsync/net/ipv4/netfilter/ip_conntrack_irc.c 2005-05-21 09:39:34.000000000 +0200 +@@ -29,9 +29,12 @@ + #include <net/checksum.h> + #include <net/tcp.h> + ++#include <linux/netfilter_ipv4/lockhelp.h> + #include <linux/netfilter_ipv4/ip_conntrack_helper.h> + #include <linux/netfilter_ipv4/ip_conntrack_irc.h> + ++static DECLARE_LOCK(ip_irc_lock); ++ + #define MAX_PORTS 8 + static int ports[MAX_PORTS]; + static int ports_c = 0;
patches/kgdb-1.9.patch +13 -13
@@ -1507,8 +1507,8 @@ #include <linux/string.h> +#include <linux/kgdb.h> #include <asm/page.h> + #include <asm/errno.h> - /* Index: linux-2.4.26-ct_sync/include/linux/sched.h =================================================================== --- linux-2.4.26-ct_sync.orig/include/linux/sched.h 2004-02-18 14:36:32.000000000 +0100
@@ -1524,7 +1524,7 @@ extern int schedule_task(struct tq_struct *task); extern void flush_scheduled_tasks(void); -@@ -958,5 +960,14 @@ +@@ -961,5 +963,14 @@ __cond_resched(); }
@@ -1670,7 +1670,7 @@ #ifdef CONFIG_ISAPNP #include <linux/isapnp.h> #endif -@@ -434,6 +438,11 @@ +@@ -440,6 +444,11 @@ * make syscalls (and thus be locked). */ smp_init();
@@ -1732,7 +1732,7 @@ #include <linux/console.h> #endif #ifdef ENABLE_SERIAL_PCI -@@ -1591,6 +1596,13 @@ +@@ -1600,6 +1605,13 @@ restore_flags(flags); }
@@ -1746,7 +1746,7 @@ #if (LINUX_VERSION_CODE < 131394) /* Linux 2.1.66 */ static int baud_table[] = { 0, 50, 75, 110, 134, 150, 200, 300, -@@ -2701,7 +2713,12 @@ +@@ -2707,7 +2719,12 @@ /* "setserial -W" is called in Debian boot */ printk ("TIOCSER?WILD ioctl obsolete, ignored.\n"); return 0;
@@ -1760,7 +1760,7 @@ default: return -ENOIOCTLCMD; } -@@ -4957,12 +4974,17 @@ +@@ -4962,12 +4979,17 @@ * * Accept a maximum of eight boards *
@@ -1778,7 +1778,7 @@ /* Register call PCI serial devices. Null out * the driver name upon failure, as a signal -@@ -6031,6 +6053,129 @@ +@@ -6036,6 +6058,129 @@ #endif /*
@@ -2228,7 +2228,7 @@ +obj-$(CONFIG_KGDB) += gdbserial.o obj-$(CONFIG_VT) += vt.o vc_screen.o consolemap.o consolemap_deftbl.o $(CONSOLE) selection.o obj-$(CONFIG_SERIAL) += $(SERIAL) - obj-$(CONFIG_SERIAL_HCDP) += hcdp_serial.o + obj-$(CONFIG_PARPORT_SERIAL) += parport_serial.o Index: linux-2.4.26-ct_sync/drivers/char/tty_io.c =================================================================== --- linux-2.4.26-ct_sync.orig/drivers/char/tty_io.c 2004-04-14 15:05:29.000000000 +0200
@@ -2243,7 +2243,7 @@ #include <asm/uaccess.h> #include <asm/system.h> -@@ -2248,6 +2251,9 @@ +@@ -2667,6 +2670,9 @@ #ifdef CONFIG_AU1X00_SERIAL_CONSOLE au1x00_serial_console_init(); #endif
@@ -3137,7 +3137,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/arch/i386/Makefile 2003-06-13 16:51:29.000000000 +0200 +++ linux-2.4.26-ct_sync/arch/i386/Makefile 2004-06-28 12:56:07.000000000 +0200 -@@ -113,6 +113,11 @@ +@@ -117,6 +117,11 @@ $(MAKE) linuxsubdirs SUBDIRS=arch/i386/mm MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
@@ -3149,7 +3149,7 @@ vmlinux: arch/i386/vmlinux.lds -@@ -148,6 +153,7 @@ +@@ -152,6 +157,7 @@ archclean: @$(MAKEBOOT) clean
@@ -4259,7 +4259,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/arch/ppc/config.in 2004-04-14 15:05:27.000000000 +0200 +++ linux-2.4.26-ct_sync/arch/ppc/config.in 2004-06-28 12:56:07.000000000 +0200 -@@ -630,6 +630,8 @@ +@@ -629,6 +629,8 @@ bool ' Wait queue debugging' CONFIG_DEBUG_WAITQ bool ' Include kgdb kernel debugger' CONFIG_KGDB if [ "$CONFIG_KGDB" = "y" ]; then
@@ -4663,7 +4663,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/Documentation/Configure.help 2004-06-28 12:56:01.000000000 +0200 +++ linux-2.4.26-ct_sync/Documentation/Configure.help 2004-06-28 12:56:07.000000000 +0200 -@@ -22146,6 +22146,31 @@ +@@ -22343,6 +22343,31 @@ If you have a Western Digital WD93 SCSI controller on an SGI MIPS system, say Y. Otherwise, say N.
patches/nfnetlink-ctnetlink.patch +50 -41
278 lines not on this page · raw message
patches/proc_net_stat.patch +0 -40
@@ -1,40 +0,0 @@ -diff -Nru linux-2.4.21-24105-cts-plain/fs/proc/root.c linux-2.4.21-24105-cts-debug/fs/proc/root.c ---- linux-2.4.21-24105-cts-plain/fs/proc/root.c 2004-10-06 15:30:02.000000000 +0200 -+++ linux-2.4.21-24105-cts-debug/fs/proc/root.c 2004-10-13 12:04:56.000000000 +0200 -@@ -17,7 +17,7 @@ - #include <linux/module.h> - #include <asm/bitops.h> - --struct proc_dir_entry *proc_net, *proc_bus, *proc_root_fs, *proc_root_driver; -+struct proc_dir_entry *proc_net, *proc_net_stat, *proc_bus, *proc_root_fs, *proc_root_driver; - - #ifdef CONFIG_SYSCTL - struct proc_dir_entry *proc_sys_root; -@@ -38,6 +38,7 @@ - } - proc_misc_init(); - proc_net = proc_mkdir("net", 0); -+ proc_net_stat = proc_mkdir("net/stat", 0); - #ifdef CONFIG_SYSVIPC - proc_mkdir("sysvipc", 0); - #endif -@@ -143,6 +144,7 @@ - EXPORT_SYMBOL(proc_root); - EXPORT_SYMBOL(proc_root_fs); - EXPORT_SYMBOL(proc_net); -+EXPORT_SYMBOL(proc_net_stat); - EXPORT_SYMBOL(proc_bus); - EXPORT_SYMBOL(proc_root_driver); - EXPORT_SYMBOL(proc_get_inode); -diff -Nru linux-2.4.21-24105-cts-plain/include/linux/proc_fs.h linux-2.4.21-24105-cts-debug/include/linux/proc_fs.h ---- linux-2.4.21-24105-cts-plain/include/linux/proc_fs.h 2004-10-13 10:39:10.000000000 +0200 -+++ linux-2.4.21-24105-cts-debug/include/linux/proc_fs.h 2004-10-15 11:54:32.000000000 +0200 -@@ -79,6 +79,7 @@ - extern struct proc_dir_entry proc_root; - extern struct proc_dir_entry *proc_root_fs; - extern struct proc_dir_entry *proc_net; -+extern struct proc_dir_entry *proc_net_stat; - extern struct proc_dir_entry *proc_bus; - extern struct proc_dir_entry *proc_root_driver; - extern struct proc_dir_entry *proc_root_kcore; -
patches/raw.patch +18 -12
@@ -3,7 +3,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/Documentation/Configure.help Wed Apr 14 15:05:24 2004 +++ linux-2.4.26-ct_sync/Documentation/Configure.help Mon Jun 14 14:52:11 2004 -@@ -2978,6 +2978,34 @@ +@@ -3025,6 +3025,34 @@ If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. If unsure, say `N'.
@@ -51,7 +51,7 @@ + /* Returns new sk_buff, or NULL */ struct sk_buff * - ip_ct_gather_frags(struct sk_buff *skb); + ip_ct_gather_frags(struct sk_buff *skb, u_int32_t user); Index: linux-2.4.26-ct_sync/include/linux/netfilter_ipv4/ipt_conntrack.h =================================================================== --- linux-2.4.26-ct_sync.orig/include/linux/netfilter_ipv4/ipt_conntrack.h Fri Nov 29 00:53:15 2002
@@ -94,7 +94,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/Config.in Mon Aug 25 13:44:44 2003 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/Config.in Mon Jun 14 14:52:11 2004 -@@ -108,6 +108,15 @@ +@@ -107,6 +107,15 @@ dep_tristate ' LOG target support' CONFIG_IP_NF_TARGET_LOG $CONFIG_IP_NF_IPTABLES dep_tristate ' ULOG target support' CONFIG_IP_NF_TARGET_ULOG $CONFIG_IP_NF_IPTABLES dep_tristate ' TCPMSS target support' CONFIG_IP_NF_TARGET_TCPMSS $CONFIG_IP_NF_IPTABLES
@@ -139,10 +139,10 @@ struct list_head *ip_conntrack_hash; static kmem_cache_t *ip_conntrack_cachep; +struct ip_conntrack ip_conntrack_untracked; + static LIST_HEAD(unconfirmed); extern struct ip_conntrack_protocol ip_conntrack_generic_protocol; - -@@ -811,6 +812,15 @@ +@@ -823,6 +824,15 @@ int set_reply; int ret;
@@ -158,7 +158,7 @@ /* FIXME: Do this right please. --RR */ (*pskb)->nfcache |= NFC_UNKNOWN; -@@ -829,18 +839,10 @@ +@@ -841,21 +851,10 @@ } #endif
@@ -170,7 +170,10 @@ - /* Gather fragments. */ - if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) { -- *pskb = ip_ct_gather_frags(*pskb); +- *pskb = ip_ct_gather_frags(*pskb, +- hooknum == NF_IP_PRE_ROUTING ? +- IP_DEFRAG_CONNTRACK_IN : +- IP_DEFRAG_CONNTRACK_OUT); - if (!*pskb) - return NF_STOLEN; - }
@@ -178,7 +181,7 @@ proto = ip_ct_find_proto((*pskb)->nh.iph->protocol); /* It may be an icmp error... */ -@@ -1439,6 +1441,18 @@ +@@ -1459,6 +1461,18 @@ /* For use by ipt_REJECT */ ip_ct_attach = ip_conntrack_attach;
@@ -201,7 +204,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_conntrack_standalone.c Wed Feb 18 14:36:32 2004 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_conntrack_standalone.c Mon Jun 14 14:52:11 2004 -@@ -189,6 +189,26 @@ +@@ -189,6 +189,29 @@ return ip_conntrack_confirm(*pskb); }
@@ -218,7 +221,10 @@ + + /* Gather fragments. */ + if ((*pskb)->nh.iph->frag_off & htons(IP_MF|IP_OFFSET)) { -+ *pskb = ip_ct_gather_frags(*pskb); ++ *pskb = ip_ct_gather_frags(*pskb, ++ hooknum == NF_IP_PRE_ROUTING ? ++ IP_DEFRAG_CONNTRACK_IN : ++ IP_DEFRAG_CONNTRACK_OUT); + if (!*pskb) + return NF_STOLEN; + }
@@ -277,7 +283,7 @@ cleanup_proc: proc_net_remove("ip_conntrack"); cleanup_init: -@@ -482,5 +522,6 @@ +@@ -483,5 +523,6 @@ EXPORT_SYMBOL(ip_conntrack_expect_list); EXPORT_SYMBOL(ip_conntrack_lock); EXPORT_SYMBOL(ip_conntrack_hash);
@@ -288,7 +294,7 @@ =================================================================== --- linux-2.4.26-ct_sync.orig/net/ipv4/netfilter/ip_nat_core.c Wed Feb 18 14:36:32 2004 +++ linux-2.4.26-ct_sync/net/ipv4/netfilter/ip_nat_core.c Mon Jun 14 14:52:11 2004 -@@ -991,6 +991,10 @@ +@@ -1023,6 +1023,10 @@ /* FIXME: Man, this is a hack. <SIGH> */ IP_NF_ASSERT(ip_conntrack_destroyed == NULL); ip_conntrack_destroyed = &ip_nat_cleanup_conntrack;
patches/seq_file-seq_start_token.patch +5 -6
@@ -1,13 +1,12 @@ diff -Nru linux-2.4.21-24105-cts-plain/include/linux/seq_file.h linux-2.4.21-24105-cts-debug/include/linux/seq_file.h --- linux-2.4.21-24105-cts-plain/include/linux/seq_file.h 2004-10-06 15:30:06.000000000 +0200 +++ linux-2.4.21-24105-cts-debug/include/linux/seq_file.h 2004-10-13 10:47:25.000000000 +0200 -@@ -2,6 +2,8 @@ - #define _LINUX_SEQ_FILE_H - #ifdef __KERNEL__ +@@ -6,6 +6,8 @@ + #include <linux/string.h> + #include <asm/semaphore.h> +#define SEQ_START_TOKEN ((void *)1) + struct seq_operations; - - struct seq_file { - + struct file; + struct vfsmount;
patches/series +1 -1
@@ -12,5 +12,5 @@ export_ip_nat_lock.patch export_ip_nat_hash.patch ct_sync_config_and_makefile.patch -proc_net_stat.patch seq_file-seq_start_token.patch +ip_conntrack_irc_lockfix.patch
Hi,
2005-05-23, h keltezéssel 21.37-kor Filip Sneppe ezt írta:
Quoted 4 lines
I played around with
ct_syncthis weekend, and got it to work with a 2.4.30 kernel. I have created an update patch for the current svn repository and would be happy if someone could review this and, if the patch looks ok, apply it. Thanks!
Thanks a lot for the patch, I'll try to commit this to the Netfilter
SVN tree. BTW, the Linux 2.4 version of ct_sync has been abandoned, and currently we're working on the 2.6 version only. It's available from the Netfilter SVN repository:
http://svn.netfilter.org/netfilter/branches/netfilter-ha/linux-2.6
Snapshots in an easy-to-apply form are available here:
http://people.netfilter.org/hidden/ct_sync/snapshots/
Thanks a lot for trying out ct_sync and providing an updated patch.
Signature · 1 line
KOVACS Krisztian <[email protected]>
Quoted 6 lines · KOVACS Krisztian
Thanks a lot for the patch, I'll try to commit this to the Netfilter
SVN tree. BTW, the Linux 2.4 version ofct_synchas been abandoned, and currently we're working on the 2.6 version only. It's available from the Netfilter SVN repository:
Quoted 7 lines
http://svn.netfilter.org/netfilter/branches/netfilter-ha/linux-2.6
Snapshots in an easy-to-apply form are available here:
http://people.netfilter.org/hidden/ct_sync/snapshots/
Thanks a lot for trying out
ct_syncand providing an updated patch.
OK, I only found out about 2.6 support yesterday when going through the netfilter-failover list archives (I now realize I should have sent the patch to this list too), but will give it a try asap.
Two small questions though:
- Are there currently major differences between 2.4 and 2.6 ct_sync ?
- Is the TODO issue about conntrack/nat helpers and expected connections and ct_sync currently blocked because noone knows how to solve the problem yet, or do you know how to tackle the problem, but haven't found the time to write the code yet ?
Thanks!
Regards,
Filip
Hi,
2005-05-26, cs keltezéssel 15.04-kor Filip Sneppe ezt írta:
Quoted 3 lines
OK, I only found out about 2.6 support yesterday when going through the netfilter-failover list archives (I now realize I should have sent the patch to this list too), but will give it a try asap.
Thanks, and please report your experiences either to me or on the
list.
Quoted 2 lines
Two small questions though:
- Are there currently major differences between 2.4 and 2.6ct_sync?
Yes, there are, although these are mostly internal changes.
Unfortunately the differences are large enough to make maintaining both versions concurrently a major pain so we decided to drop the 2.4 support.
Quoted 4 lines
- Is the TODO issue about conntrack/nat helpers and expected connections and
ct_synccurrently blocked because noone knows how to solve the problem yet, or do you know how to tackle the problem, but haven't found the time to write the code yet ?
There were some problems with expectation handling up to 2.6.10.
However, in Linux 2.6.11 this has been simplified a lot, and this makes implementing expectation failover much easier. Unfortunately I currently lack the necessary hardware and free time, and although Harald has been working on the project lately, things are moving painfully slowly...
So, any help with the project (testing, hunting bugs or contributing
source code) is much appreciated. Feel free to email me/the list if you have any questions.
BTW, the ct_sync for 2.6.11 is not in the SVN tree yet, there's a
patch on my snapshots page, or you can find it in broken-out form in my GNU Arch repository at
http://people.netfilter.org/hidden/archives/2005-public/
Signature · 1 line
KOVACS Krisztian <[email protected]>