PDA

Bekijk de volledige versie : not a valid IP address



arakar
10-11-2007, 16:03
When setting up a static WAN IP address, I receive the following error:
... not a valid IP address!

The address starts with 84.255.x.x
I found out, that there is a bug in /www/English/general.js in line 211:
if(v1==255||v2==255||v3==255||v4==255||v1==0||v4== 0||v1==127||v1==224)
which does not allow number 255 in any part of IP address, which is incorrect.
The line should be:
if(v1==0||v4==0||v1==127||v1==224)

I am using kfurge's firmware, but I am sure that the bug is present in original one as well.
As a workaround, I copied the contents of /www directory to a writable location, i.e: /shares/MYVOLUME1/www
changed general.js as above, mounted the new location as /www and restarted httpd. Then, I was able to change the IP address in Web Manager.

Luckily, the check is done only during setup and not during normal operation. However, I would prefer to change the general.js file permanently at the original read-only location, but I don't know how.

Please help!

Andrej

arakar
15-11-2007, 09:08
I thought there are many firmware gurus on this forum, but I received no answer. So I try to ask again:
Is it possible to change a file in the read-only location on the WL-700ge file system, and if so, how?

I would really appreciate your help,
Andrej

kfurge
17-11-2007, 20:26
Is it possible to change a file in the read-only location on the WL-700ge file system, and if so, how?

Not directly... That would defeat the purpose of "read-only"!

However, it can be done indirectly. Simply make a copy of the filesystem containing the file you want modified to somewhere on the HDD (/shares/MYVOLUME1). Then use "mount -o bind" to to mount the read-write filesystem over the top of the read-only filesystem.

Put the commands into rc.local (if you're using my firmware) to make your changes stick between reboots.

- K.C.

arakar
17-11-2007, 21:54
Thanks, kfurge, for your answer. This is exactly what I did to be able to set the IP address. I just wanted to check if there is no better solution. Maybe it would be a good idea to include this fix in your next firmware release.

Thanks,
Andrej

kfurge
23-12-2007, 04:12
Yes, this ability will be more of a standard feature with future images. It's a little tricky to do these filesystem tweaks and still get the router to shut down properly. The only way to see that the router is upset is with a serial console, which only a handful of us have installed.

- K.C.