zhuravskiy / wl500g

Automatically exported from code.google.com/p/wl500g
0 stars 0 forks source link

Description in Virtual Server List truncated after 4 (!!) characters #327

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. I'm using WL500gpv2-1.9.2.7-d-r4257.trx downloaded from 
http://wpte.kicks-ass.net/filebrowser/index.php?dir=Oleg+Firmware/Nightlys/1.9.2
.7-d/4257
2. go to NAT Setting | Virtual Server
3. look at the Virtual Server List (suppose you have some entries in it)

What is the expected output? What do you see instead?
The description should be shown at full, or at least truncated after a 
reasonable amount of characters.

Instead, after r2962 introduced the ability to specify the Source IP, in order 
to (I think) keep the table without horizontal scrolling, the description is 
cut after only 4 characters. This makes the description useless, while it's 
very important to me because I have a lot of rules.

What version of the product are you using?
1.9.2.7-d-r4257

Please provide any additional information below.
With the old WL500gpv2-1.9.2.7-d-r2624.trx this problem was not present.

Original issue reported on code.google.com by mauro...@tiscali.it on 7 Jun 2012 at 10:04

GoogleCodeExporter commented 8 years ago
"d" branch frozen, please try newer "rtn" firmwares

Original comment by lly.dev on 7 Jun 2012 at 12:33

GoogleCodeExporter commented 8 years ago
But is this problem present also in the "rtn" release or not?

I'm a bit reluctant to upgrade to the rtn release, since I can't really 
understand if there are retro-compatibility issues (either in the upgrade 
process or during normal operation) against the d release.

Original comment by mauro...@tiscali.it on 7 Jun 2012 at 2:02

GoogleCodeExporter commented 8 years ago
I can't reproduce the issue on "rtn" & Firefox 3.6

Original comment by lly.dev on 7 Jun 2012 at 4:12

GoogleCodeExporter commented 8 years ago
I just flashed WL500gpv2-1.9.2.7-rtn-r4051.trx and I still reproduce (using 
Firefox 10.0.5 and Opera 11.64).
The problem is not the browser, since the produced HTML contains the truncated 
description.

The settings where inherited from the previous firmware. I also tried to 
re-load the setting file I previously had exported (and this setting file does 
contain full descriptions), but with no luck: descriptions are still shown 
truncated in the Virtual Server List.

By the way, by upgrading I lost my configuration about a mounted ext3 usb drive 
+ swap partition and I lost ipkg...

Original comment by mauro...@tiscali.it on 7 Jun 2012 at 5:29

GoogleCodeExporter commented 8 years ago
My HTML source(all data is fake):

<select size="8" name="VSList_s" multiple="true" 
class="content_list_body"><option 
value="0">212.123.145.178 5060:65534  192.168.1.122   123    TCP   
              Long Description    </option></select>

You have to backup your flashfs before upgrade, there is no resources on 
router/firmware to perform "smart" update.

Original comment by lly.dev on 7 Jun 2012 at 6:33

GoogleCodeExporter commented 8 years ago
When I upgraded from WL500gpv2-1.9.2.7-d-r2624.trx to 
WL500gpv2-1.9.2.7-d-r4257.trx I didn't need to reload the backed up flashfs. 
Anyway, I'm re-configuring the mount points and re-installing ipkg/opkg (I 
seized the opportunity to install opkg from the Entware instead of the old ipkg 
from Optware, as your changelogs seem to suggest, am I doing right?). 

Anyway, this is the HTML I get, instead (ports and IPs are fictitious):
<option 
value="4">                9999        192.168.1.20   
  9998   TCP                 Desc</option>

While the corresponding entry in the setting file is something like:
vts_desc_x4=Descripti bla

Original comment by mauro...@tiscali.it on 7 Jun 2012 at 7:28

GoogleCodeExporter commented 8 years ago
Entware(Optware ipkg replacement) brings much new features, but upgrade is up 
to you. You can edit /etc/ipkg.conf and rollback to Optware at any time.

Unfortunately, me & other developers can't reproduce web-UI behavior you 
described in the issue.

Original comment by lly.dev on 8 Jun 2012 at 6:28

GoogleCodeExporter commented 8 years ago
Now I have opkg installed (I followed instructions at 
http://code.google.com/p/wl500g-repo/wiki/Using). So can I still use opkg 
instead of ipkg with the old Optware repository by just changing ipkg.conf, if 
in case? Or should I also remove opkg in favour of ipkg?

Regarding this issue: could be of any help if I send you my setting file so you 
can try to load into your own configuration?

Original comment by mauro...@tiscali.it on 8 Jun 2012 at 7:43

GoogleCodeExporter commented 8 years ago
Most info about Entware is at wl500g.info forum. Entware incompatible with 
Optware.

About settings - yes, you can send it by email or attach in issue(if it hasn't 
any private info). But, on my previous experience, it will not help to 
reproduce the bug.

Simpler variant:

nvram show|grep "vts_"

Original comment by lly.dev on 9 Jun 2012 at 6:36

GoogleCodeExporter commented 8 years ago
I've sent you an e-mail with the output of:
nvram show|grep "vts_"
and the corresponding generated HTML.

Original comment by mauro...@tiscali.it on 11 Jun 2012 at 3:03

GoogleCodeExporter commented 8 years ago
Thanks for info. nvram content OK, so it might be HTML generation bug only. As 
none of us can reproduce line trimming in HTML source, I can imagine the only 
one choice - you have somewhere an old copy of "httpd" server binary.

Original comment by lly.dev on 12 Jun 2012 at 8:45

GoogleCodeExporter commented 8 years ago
How can I check the version of httpd I'm using? "httpd -v" does not work (says 
"bind: Address already in use / can't bind to any address").

Anyway, I'm using /usr/sbin/httpd, which I suppose is coming with the firmware, 
isn't it?

Original comment by mauro...@tiscali.it on 12 Jun 2012 at 9:04

GoogleCodeExporter commented 8 years ago
Unfortunately, ASUS httpd has no version/help/etc. messages.

I cannot be sure, what httpd you are using, just guess due to it trims line to 
maximum size of 75 (pre-r2962 fields length sum)

Original comment by lly.dev on 12 Jun 2012 at 1:00

GoogleCodeExporter commented 8 years ago
So, what can I do?

Original comment by mauro...@tiscali.it on 12 Jun 2012 at 1:33

GoogleCodeExporter commented 8 years ago
Since none of us can reproduce such behavior on current trunk(r4329), problem 
might be in your specific config (any external software/libraries, etc.). I 
can't guess anything more, sorry.

Original comment by lly.dev on 12 Jun 2012 at 1:52

GoogleCodeExporter commented 8 years ago
Hmmmm... considering that this problem arose just after upgrading the firmware 
(i.e.: no external software or libraries were installed on the router in that 
moment), how can this problem be caused by any specific config?

After firmware upgrade, I just mounted an ext3 partition on /opt, activated a 
swap partition and installed opkg and the following Entware packages:
findutils - 4.5.10-1
glib2 - 2.26.1-2
ldconfig - 0.9.32-2
libc - 0.9.32-2
libgcc - 4.5.3-2
libiconv-full - 1.11.1-1
libintl-full - 0.18.1.1-1
libncurses - 5.7-5
libpthread - 0.9.32-2
librt - 0.9.32-2
libslang2 - 2.2.4-1
libstdcpp - 4.5.3-2
mc - 4.8.2-1
terminfo - 5.7-5
uclibc-opt - 0.9.32-2

As I said, /usr/sbin/httpd must come from the firmware, unless there's some 
magic space in the Flash memory of the router where software can reside and 
survive a firmware upgrade...

Original comment by mauro...@tiscali.it on 12 Jun 2012 at 1:58

GoogleCodeExporter commented 8 years ago
Well, how you can explain that fact - I upload your settings(vts_*) into nvram 
and get unstripped HTML output?

Of course, I can't exclude bug in httpd, but reproduction needed to fix it.

No magic space, possible some garbage in nvram, but I never see it myself.

Original comment by lly.dev on 12 Jun 2012 at 2:13

GoogleCodeExporter commented 8 years ago
So, what's the code that is invoked when you request the Virtual Server List? 
In /www/Advanced_VirtualServer_Content.asp I see:

<% nvram_get_table_x("IPConnection","VSList"); %>

but I can't understand what this will cause to be invoked on the router. I know 
ASP, but I can't find any included page where the funcion nvram_get_table_x() 
is declared. I suspect this is some "vendor-specific" ASP call that is 
internally translated by the router software into a shell script command. Can 
you help me to debug?

Original comment by mauro...@tiscali.it on 14 Jun 2012 at 9:00

GoogleCodeExporter commented 8 years ago
It is not windows ASP - it is commands understood-able by ASUS httpd server.

Code above calls ej_nvram_get_table_x() function in web_ex.c. Actual text 
generated in nvram_add_group_table() function, tunable parameters can be found 
in variables.c - variables_IPConnection + variables_IPConnection_VSList.

For maximum line length truncation 2-nd ARGV parameter of 
variables_IPConnection["VSList"] responsible.

Easiest way to output debug data - syslog.

Original comment by lly.dev on 15 Jun 2012 at 6:37

GoogleCodeExporter commented 8 years ago
Well, I'm not so expert to do a real debug session... I'm a Java programmer, 
but I'm not good at C and Linux compiling. I hoped the result shown by the web 
interface were just the output of a shell script or command, but I understand 
that it's instead the httpd binary that is internally handling all the 
computation.

By the way, I have some considerations:
- if I had an old version of httpd, you may try to send me the current one and 
I can check if the two binaries are different... My httpd is listed as follows 
in /usr/sbin:
-rwxr-xr-x    1 admin    root        114348 Apr  2 20:00 httpd

Second consideration: if I had an old version of httpd, I suspect that the 
array variable variables_IPConnection_VSList[] would be missing the first 
field, vts_sipaddr_x. If this were the case, I should have other severe 
problems in managing the source IP address field of the Virtual Server List. 
Instead, I tried to add new rows and/or clear the table and recreate it from 
scratch and I can use it at its full potential (including specifying the source 
IP address) except for the description field which is always truncated after 4 
characters.

If it isn't too much work for you, I may try a modified version of 
WL500gpv2-1.9.2.7-rtn-r4051.trx on my router with debug output to see what is 
going on my system...

Original comment by mauro...@tiscali.it on 15 Jun 2012 at 7:36

GoogleCodeExporter commented 8 years ago
Otherwise I would need step-by-step instructions to do it myself, including 
changes to make in the C source file and instructions to build under Windows 
(for this I see I can use instructions at 
http://code.google.com/p/wl500g/wiki/CoLinux), although I fear it would be even 
more time consuming for you... :-(

Original comment by mauro...@tiscali.it on 15 Jun 2012 at 7:39

GoogleCodeExporter commented 8 years ago
Ok, I will try to find time for prepare debug build for you after some httpd 
cleanup.

Original comment by lly.dev on 15 Jun 2012 at 5:59

GoogleCodeExporter commented 8 years ago
Sorry, I forgot to mention that bug was fixed since r4133 only. Please try 
r4330 release or night snapshots from

http://asus.vectormm.net/rtn/
http://wpte.kicks-ass.net/downloads/Oleg Firmware/Nightlys/1.9.2.7-rtn/

Original comment by lly.dev on 15 Jun 2012 at 7:09

GoogleCodeExporter commented 8 years ago
With firmware r4330 the problem is fixed, thank you!

So, I was not crazy! :-D

BTW: with the rtn firmwares the upgrade procedure is not always so "clean"... 
it's much slower than upgrading to a new d firmware release and it usually 
doesn't reboot. After waiting lots of minutes (I'm too concerned about bricking 
the router while the firmware update is in progress) I have to unplug and plug 
the power cord again in order to get the router back to normal. Otherwise it 
simply stays as a "zombie" (the LAN connection is never dropped, the router 
will keep on responding to ping requests, but no web interface nor ssh accesses 
are available any longer). Any hint would be appreciated.

Original comment by mauro...@tiscali.it on 19 Jun 2012 at 8:40

GoogleCodeExporter commented 8 years ago
It is known problem, happens due to increased FW size. Hope, we will find time 
to fix it in future.

Original comment by lly.dev on 19 Jun 2012 at 1:43

GoogleCodeExporter commented 8 years ago
Do you mind me to create a new ticket for this (the firmware upgrade problem), 
so that I can monitor if there is any progress? I can't find an existing one.

Original comment by mauro...@tiscali.it on 19 Jun 2012 at 1:56