Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum line size is breached resulting in values being ignored #48

Open
built2order opened this issue Oct 31, 2022 · 0 comments
Open

Comments

@built2order
Copy link

It seems that the host file has a hard limit of 256 characters per line.

If adding a number of hosts that exceed a maximum line size of 256 characters, the values are ignored.

Example 1: Large number of hosts

$ cat /etc/hosts
127.0.0.1 www1.mysite.com www2.mysite.com www3.mysite.com www4.mysite.com www5.mysite.com www6.mysite.com www7.mysite.com www8.mysite.com www9.mysite.com www10.mysite.com www11.mysite.com www12.mysite.com www13.mysite.com www14.mysite.com www15.mysite.com www16.mysite.com www17.mysite.com www18.mysite.com www19.mysite.com www20.mysite.com
$ ping www11.mysite.com
PING www11.mysite.com (13.X.X.X): 56 data bytes
64 bytes from 13.X.X.X: icmp_seq=0 ttl=117 time=18.003 ms

Example 2: Single host

$ cat /etc/hosts
127.0.0.1 www11.mysite.com
$ ping www11.mysite.com
PING www11.mysite.com (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.070 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant