What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

hosts.add bug in RT-AC87U-378.56_2

rkraats

New Around Here
Dear all,

I encountered a very strange issue... When I have a line in /jffs/configs/hosts.add with too many host names for one IP address, the 5GHz band no longer works (the web interface reports 'Channel 0') and the 'Wireless' web interface page is all messed up; only the 'Wireless - General' tab contents are shown (so not the surrounding menus) and the 2.4G an 5G fields seem to be mixed.

An example line in hosts.add which triggers the problem after rebooting:
192.168.26.11 printer-act a1 a2 a3 a4 a5 a6

Removing the 'a1 a2 a3 a4 a5 a6' and rebooting fixes the problem.

This on an RT-AC87U with merlin 378.56_2

It took some time before I found the cause of the problem :-)

It would be great if someone could look into this issue, so others won't encounter it as well; I already know how to circumvent it...

Thanks,
Roel
 
merlin-hosts.add-result.png

example of mangled screen
 
Spaces in hostnames are not quite right... (Spaces are not allowed in hostnames)
And it is not a bug... ;)
Probably it just breaks WEB UI Javascript somehow.

Try to replace those with something, like - or . and try after that again.

192.168.26.11 printer-act a1 a2 a3 a4 a5 a6
Code:
192.168.26.11  printer-act-a1-a2-a3-a4-a5-a6
 
Last edited:
Spaces in hostnames are not quite right... (Spaces are not allowed in hostnames)
Thanks Etz, but these are not spaces in a single hostname, but different hostnames (aliases) for the same IP address.

From 'man hosts' on my Fedora machine:
HOSTS(5) Linux Programmer's Manual HOSTS(5)

NAME
hosts - static table lookup for hostnames

SYNOPSIS
/etc/hosts

DESCRIPTION
This manual page describes the format of the /etc/hosts file. This
file is a simple text file that associates IP addresses with hostnames,
one line per IP address. For each host a single line should be present
with the following information:

IP_address canonical_hostname [aliases...]

Fields of the entry are separated by any number of blanks and/or tab
characters. Text from a "#" character until the end of the line is a
comment, and is ignored. Host names may contain only alphanumeric
characters, minus signs ("-"), and periods ("."). They must begin with
an alphabetic character and end with an alphanumeric character.
Optional aliases provide for name changes, alternate spellings, shorter
hostnames, or generic hostnames (for example, localhost).
.....
 
From what I remember, there's a limitation to how long a host file entry can be. This limitation is inside uclibc, not much that can be done beside shortening your host file entries.
 
From what I remember, there's a limitation to how long a host file entry can be. This limitation is inside uclibc, not much that can be done beside shortening your host file entries.
I see. Thanks. But isn't it strange that it results in a disfunctional 5 GHz band and a messed up web interface?
 
I see. Thanks. But isn't it strange that it results in a disfunctional 5 GHz band and a messed up web interface?

Could be the buffer overrun causes some generated content to contain random data instead of being simply truncated. If you open your web browser's error console, you'll see what is causing the page to break.
 
Hi RMerlin,
The problem in the web interface is on the 2nd of these lines of Advanced_Wireless_Content.asp, which gives (of course) a syntax error:
wl_channel_list_2g = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"];
wl_channel_list_5g = ;
var cur_control_channel = [["6", "0"]][0];
 
Hi RMerlin,
The problem in the web interface is on the 2nd of these lines of Advanced_Wireless_Content.asp, which gives (of course) a syntax error:

Either you have corrupted nvram, or the Quantenna part of your router, which handles the 5 GHz band, is dead.

Try a factory default reset. If it still fails, you will have to RMA your router.
 
Either you have corrupted nvram, or the Quantenna part of your router, which handles the 5 GHz band, is dead.

Try a factory default reset. If it still fails, you will have to RMA your router.
Fortunately it's not that bad. After I remove the (too many) aliases in /jffs/configs/hosts.add and reboot then everything is fine again.

I was wondering if anybody can reproduce this issue with these hosts.add aliases?
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top