A minor bug in K2.6 release (fixed, just a misunderstanding)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
UnknownzD
DD-WRT Novice


Joined: 09 Jan 2010
Posts: 10

PostPosted: Wed Apr 28, 2010 13:00    Post subject: A minor bug in K2.6 release (fixed, just a misunderstanding) Reply with quote
I have find a minor bug in K2.6, don't know if those are existing in the newer release of K2.4 or not as the path could be changed too if the kernel version is >= 2.4.23.

The problem that I have found is the file path pointed to ip_conntrack_max is still not yet updated as the path has been updated in kernel version 2.4.23 already.

Code:
/bin/echo $CONNTRACK_MAX > /proc/sys/net/ipv4/ip_conntrack_max

And it should be changed to
Code:
/bin/echo $CONNTRACK_MAX > /proc/sys/net/ipv4/netfilter/ip_conntrack_max


And I have found the problem in this release :
Code:
DD-WRT v24-sp2 (01/02/10) mini
(SVN revision 13575M NEWD-2 K2.6 Eko)


By the way after I have looked at the svn, it is hard to believe that the preinit file has not been updated for 2 years
Code:
Revision 9822, 1.9 kB (checked in by BrainSlayer, 2 years ago)


Last edited by UnknownzD on Fri Apr 30, 2010 2:27; edited 3 times in total
Sponsor
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Wed Apr 28, 2010 22:52    Post subject: Re: A minor bug in K2.6 release Reply with quote
UnknownzD wrote:
Code:
/bin/echo $CONNTRACK_MAX > /proc/sys/net/ipv4/ip_conntrack_max

And it should be changed to
Code:
/bin/echo $CONNTRACK_MAX > /proc/sys/net/ipv4/netfilter/ip_conntrack_max

It would help if you told where the code is. However, have you checked to be sure that it really needs to be changed? In k2.4 builds you can use either path, they're linked together.

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
UnknownzD
DD-WRT Novice


Joined: 09 Jan 2010
Posts: 10

PostPosted: Wed Apr 28, 2010 23:17    Post subject: Reply with quote
phuzi0n wrote:
UnknownzD wrote:
Code:
/bin/echo $CONNTRACK_MAX > /proc/sys/net/ipv4/ip_conntrack_max

And it should be changed to
Code:
/bin/echo $CONNTRACK_MAX > /proc/sys/net/ipv4/netfilter/ip_conntrack_max

It would help if you told where the code is. However, have you checked to be sure that it really needs to be changed? In k2.4 builds you can use either path, they're linked together.


Well the code is inside the /etc/preinit file which is used as an startup script for all OS based on OpenWrt.

By the way I can show you that they are not linked at all as the echo command fail all the time, as telling that "/proc/sys/net/ipv4/ip_conntrack_max" is an non-existing file.

Code:
root@Unknown | zD:~# cat /etc/preinit | grep echo
/bin/echo $CONNTRACK_MAX > /proc/sys/net/ipv4/ip_conntrack_max
/bin/echo $CONNTRACK_TCP_TIMEOUTS > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_timeout_established
/bin/echo $CONNTRACK_UDP_TIMEOUTS > /proc/sys/net/ipv4/netfilter/ip_conntrack_udp_timeout_stream
root@Unknown | zD:~# cat /proc/sys/net/ipv4/ip_conntrack_max
root@Unknown | zD:~# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
4096
root@Unknown | zD:~# echo 9999 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
root@Unknown | zD:~# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
9999
root@Unknown | zD:~# cat /proc/sys/net/ipv4/ip_conntrack_max
root@Unknown | zD:~# echo 4096 > /proc/sys/net/ipv4/ip_conntrack_max
-sh: can't create /proc/sys/net/ipv4/ip_conntrack_max: nonexistent directory
root@Unknown | zD:~# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
9999
root@Unknown | zD:~# echo 4096 > /proc/sys/net/ipv4/netfilter/ip_conntrack_max
root@Unknown | zD:~# cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
4096
root@Unknown | zD:~# cd /proc/sys/net/ipv4/netfilter
root@Unknown | zD:/proc/sys/net/ipv4/netfilter# ls -la
dr-xr-xr-x    0 root     root            0 Apr 29 08:13 .
dr-xr-xr-x    0 root     root            0 Apr 29 08:12 ..
-r--r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_buckets
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_checksum
-r--r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_count
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_generic_timeout
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_icmp_timeout
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_log_invalid
-rw-r--r--    1 root     root            0 Apr 29 08:16 ip_conntrack_max
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_sctp_timeout_closed
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_sctp_timeout_cookie_echoed
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_sctp_timeout_cookie_wait
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_sctp_timeout_established
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_sctp_timeout_shutdown_ack_sent
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_sctp_timeout_shutdown_recd
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_sctp_timeout_shutdown_sent
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_be_liberal
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_loose
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_max_retrans
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_close
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_close_wait
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_established
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_fin_wait
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_last_ack
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_max_retrans
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_syn_recv
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_syn_sent
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_tcp_timeout_time_wait
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_udp_timeout
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_conntrack_udp_timeout_stream
root@Unknown | zD:/proc/sys/net/ipv4/netfilter# cd ..
root@Unknown | zD:/proc/sys/net/ipv4# ls -la
dr-xr-xr-x    0 root     root            0 Apr 29 08:12 .
dr-xr-xr-x    0 root     root            0 Apr 29 08:12 ..
dr-xr-xr-x    0 root     root            0 Apr 29 08:20 conf
-rw-r--r--    1 root     root            0 Apr 29 08:20 icmp_echo_ignore_all
-rw-r--r--    1 root     root            0 Apr 29 08:20 icmp_echo_ignore_broadcasts
-rw-r--r--    1 root     root            0 Apr 29 08:20 icmp_errors_use_inbound_ifaddr
-rw-r--r--    1 root     root            0 Apr 29 08:20 icmp_ignore_bogus_error_responses
-rw-r--r--    1 root     root            0 Apr 29 08:20 icmp_ratelimit
-rw-r--r--    1 root     root            0 Apr 29 08:20 icmp_ratemask
-rw-r--r--    1 root     root            0 Apr 29 08:20 igmp_max_memberships
-rw-r--r--    1 root     root            0 Apr 29 08:20 igmp_max_msf
-rw-r--r--    1 root     root            0 Apr 29 08:20 inet_peer_gc_maxtime
-rw-r--r--    1 root     root            0 Apr 29 08:20 inet_peer_gc_mintime
-rw-r--r--    1 root     root            0 Apr 29 08:20 inet_peer_maxttl
-rw-r--r--    1 root     root            0 Apr 29 08:20 inet_peer_minttl
-rw-r--r--    1 root     root            0 Apr 29 08:20 inet_peer_threshold
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_default_ttl
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_dynaddr
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_forward
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_local_port_range
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_no_pmtu_disc
-rw-r--r--    1 root     root            0 Apr 29 08:20 ip_nonlocal_bind
-rw-r--r--    1 root     root            0 Apr 29 08:20 ipfrag_high_thresh
-rw-r--r--    1 root     root            0 Apr 29 08:20 ipfrag_low_thresh
-rw-r--r--    1 root     root            0 Apr 29 08:20 ipfrag_max_dist
-rw-r--r--    1 root     root            0 Apr 29 08:20 ipfrag_secret_interval
-rw-r--r--    1 root     root            0 Apr 29 08:20 ipfrag_time
dr-xr-xr-x    0 root     root            0 Apr 29 08:20 neigh
dr-xr-xr-x    0 root     root            0 Apr 29 08:13 netfilter
dr-xr-xr-x    0 root     root            0 Apr 29 08:20 route
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_abc
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_abort_on_overflow
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_adv_win_scale
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_allowed_congestion_control
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_app_win
-r--r--r--    1 root     root            0 Apr 29 08:20 tcp_available_congestion_control
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_base_mss
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_congestion_control
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_dsack
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_ecn
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_fack
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_fin_timeout
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_frto
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_frto_response
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_keepalive_intvl
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_keepalive_probes
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_keepalive_time
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_low_latency
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_max_orphans
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_max_ssthresh
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_max_syn_backlog
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_max_tw_buckets
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_mem
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_moderate_rcvbuf
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_mtu_probing
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_no_metrics_save
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_orphan_retries
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_reordering
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_retrans_collapse
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_retries1
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_retries2
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_rfc1337
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_rmem
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_sack
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_slow_start_after_idle
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_stdurg
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_syn_retries
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_synack_retries
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_syncookies
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_timestamps
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_tso_win_divisor
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_tw_recycle
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_tw_reuse
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_window_scaling
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_wmem
-rw-r--r--    1 root     root            0 Apr 29 08:20 tcp_workaround_signed_windows
root@Unknown | zD:/proc/sys/net/ipv4#
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Thu Apr 29, 2010 2:33    Post subject: Reply with quote
What specific build (kernel + build #) is that on?
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
UnknownzD
DD-WRT Novice


Joined: 09 Jan 2010
Posts: 10

PostPosted: Thu Apr 29, 2010 13:39    Post subject: Reply with quote
phuzi0n wrote:
What specific build (kernel + build #) is that on?


The bin that I was used is dd-wrt.v24-13575_NEWD-2_K2.6_mini.bin and I have performed a hard reset (press reset button > 10secs) after update to reset it before doing any action on it.

By the way I can't use the newest release 14205 as it bricked my "Buffalo WHR-HP-G54" which requires a tftp firmware restore.

In addition, the following information may be useful for you.
Code:
root@Unknown | zD:~# uname -a
Linux Unknown | zD. 2.6.24.111 #342 Sat Jan 2 12:37:57 CET 2010 mips unknown


From the "Status -> Router" page :
Code:
Firmware Version DD-WRT v24-sp2 (01/02/10) mini - build 13575M NEWD-2 K2.6 Eko
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Thu Apr 29, 2010 18:27    Post subject: Reply with quote
I can't see any obvious reason for it. The makefile is set to use conntrack.26 for broadcom k2.6 builds and the conntrack.26.startup file references the nefilter path.

http://svn.dd-wrt.com:8000/dd-wrt/browser/src/router/conntrack

http://svn.dd-wrt.com:8000/dd-wrt/ticket/1473

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
UnknownzD
DD-WRT Novice


Joined: 09 Jan 2010
Posts: 10

PostPosted: Fri Apr 30, 2010 1:06    Post subject: Reply with quote
phuzi0n wrote:
I can't see any obvious reason for it. The makefile is set to use conntrack.26 for broadcom k2.6 builds and the conntrack.26.startup file references the nefilter path.

http://svn.dd-wrt.com:8000/dd-wrt/browser/src/router/conntrack

http://svn.dd-wrt.com:8000/dd-wrt/ticket/1473


Er .... thank you for reporting that, I will try to do a hard reset (tftp + factory restore) again to see if there is any difference.

By the way, could that be an incorrect setting in the Makefile that makes such a result?

From http://svn.dd-wrt.com:8000/dd-wrt/browser/src/router/conntrack/Makefile :
Code:
MODULE:=conntrack.startup
ifeq ($(CONFIG_RB500),y)
MODULE:=conntrack.26
endif
ifeq ($(CONFIG_BCMMODERN),y)
MODULE:=conntrack.26
endif


Could it be
Code:
conntrack.26.startup
instead of
Code:
conntrack.26
? As the above line is using
Code:
MODULE:=conntrack.startup
to setup the conntrack path for K2.4 release.

In addition, it could be the flag $CONFIG_BCMMODERN is not set too if it is not loading the following file : http://svn.dd-wrt.com:8000/dd-wrt/browser/src/router/configs/broadcom_K26/.config_mini.v24-K26


Last edited by UnknownzD on Fri Apr 30, 2010 1:48; edited 2 times in total
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Fri Apr 30, 2010 1:44    Post subject: Reply with quote
A hard reset won't change the contents of that file. You could try other builds/versions though.
_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
UnknownzD
DD-WRT Novice


Joined: 09 Jan 2010
Posts: 10

PostPosted: Fri Apr 30, 2010 1:50    Post subject: Reply with quote
phuzi0n wrote:
A hard reset won't change the contents of that file. You could try other builds/versions though.


I have edited my reply as showing the possible reason that I have found, hope that you can have time to look at it.

By the way, is DD-WRT executing the additional script (conntrack.26.startup) to setup the conntrack path instead of just using preinit in K2.6 release? coz I found it on my router. If so why don't you guys change the setting in preinit such that appending the content of conntrack.26.startup into the preinit file. Such file structure is making people very confusing :\ As users don't know which setting is really loaded by the router :\


Last edited by UnknownzD on Fri Apr 30, 2010 2:25; edited 3 times in total
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Fri Apr 30, 2010 2:17    Post subject: Reply with quote
18 CONFIG_BCMMODERN=y

It's set at line 18 in the k2.6 mini config but I'm not sure whether "conntrack.26" needs to have ".startup" in it or if the compiler auto-completes it. I didn't notice anywhere that would fall back to using the old file if it was incorrect either...

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
UnknownzD
DD-WRT Novice


Joined: 09 Jan 2010
Posts: 10

PostPosted: Fri Apr 30, 2010 2:36    Post subject: Reply with quote
phuzi0n wrote:
18 CONFIG_BCMMODERN=y

It's set at line 18 in the k2.6 mini config but I'm not sure whether "conntrack.26" needs to have ".startup" in it or if the compiler auto-completes it. I didn't notice anywhere that would fall back to using the old file if it was incorrect either...


Nevermind I have found the reason already, just a misunderstanding. Sorry for any inconvenience as the router is loading an *additional* script to setup the conntrack setting. But I think the following script or something like it would not be to hard to be put into the makefile.
Code:

ifeq ($(CONFIG_BCMMODERN),y)
cat ../../opt/etc/preinit ./conntrack/conntrack.26.startup > mipsel-uclibc/target/etc/preinit
endif
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum