Ok, I am ready to be ridiculed and bashed, so here goes... I know this is useless ... and dumb.. and stupid.. and idiotic.. etc.. and I apologize for not knowing everything right away.
I wanted to adjust the established TCP conneciton timeout value, but a seemingly correct entry in sysconf.ctl didn't seem to work, and I didn't like the idea of having to set the /proc/sys/net/ipv4/netfilter/ip_* file through a startup script.
If these configuration files (/proc/sys/net/ipv4/netfilter) would persist across a reboot, there'd be no issue at all, but they seem to be reset at each boot (reconfigured by netfilter?).
So I, still learning the build environment, just added a White Russian RC5 patch to:
./target/linux/linux-2.4/patches/generic
I named it next in line after the pre-existing patch, so it ended up being:
118-netfilter_TCP_EST_TIMEOUT.patch
diff -urN linux-2.4.30.old/net/ipv4/netfilter/ip_conntrack_proto_tcp.c linux-2.4.30.dev/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
--- ../../buildroot-unpacked/build_mipsel/linux/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2006-06-14 23:38:56.000000000 -0400
+++ linux/net/ipv4/netfilter/ip_conntrack_proto_tcp.c 2006-06-14 23:40:19.000000000 -0400
@@ -51,7 +51,7 @@
unsigned long ip_ct_tcp_timeout_syn_sent = 2 MINS;
unsigned long ip_ct_tcp_timeout_syn_recv = 60 SECS;
-unsigned long ip_ct_tcp_timeout_established = 5 DAYS;
+unsigned long ip_ct_tcp_timeout_established = 6 HOURS;
unsigned long ip_ct_tcp_timeout_fin_wait = 2 MINS;
unsigned long ip_ct_tcp_timeout_close_wait = 60 SECS;
unsigned long ip_ct_tcp_timeout_last_ack = 30 SECS;
So now I think this works out fine for me.
1.) Oh, goodie. I think I'm getting acquainted with the linux patch system.
2.) Why not reduce the default value of 5 days to something less? I know some established TCP connections could concievably go that long without traffic, but in reality there are probably other 'kills' along the line when a connection has been idle that long. Perhaps 6 hours is too little though, and 1 day is more appropriate. All I know is that my connection table would fill up after a couple days of p2p use since many connections apparently weren't being closed properly.
3.) Is there another way to configure this (other than an 'echo X > /proc/sys/net/ipv4/netfilter/...' at startup)? Why wasn't my sysctl.conf entry working, is it supposed to?