Community discussions

MikroTik App
 
User avatar
baragoon
Member Candidate
Member Candidate
Topic Author
Posts: 294
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Strange symbol in dhcp-hostname

Mon Feb 06, 2017 2:34 pm

Hi all.
I have and old Sony PS3 box connected to Mikrotik and I see that dhcp-hostname which set from PS3 network options is showing strange symbols (I also updated PS3 to latest FW and still seeing incorrect dhcp-hostname).
From Winbox:
1.png
From ssh:
2.png
ps3\00
Webfig shows this lease with correct hostname, without any cubes or zeroes.
Anybody facing such symbols?
Thanks.
You do not have the required permissions to view the files attached to this post.
 
R1CH
Forum Guru
Forum Guru
Posts: 1098
Joined: Sun Oct 01, 2006 11:44 pm

Re: Strange symbol in dhcp-hostname

Mon Feb 06, 2017 3:42 pm

Looks like the PS3 DHCP client has an off-by-one error in the length of the hostname (the \00 is a null terminator that indicates the end of a string). Interesting bug, but completely harmless (DHCP client hostnames have no character set restrictions).
3.1. Name space definitions

Domain names in messages are expressed in terms of a sequence of labels.
Each label is represented as a one octet length field followed by that
number of octets. Since every domain name ends with the null label of
the root, a domain name is terminated by a length byte of zero. The
high order two bits of every length octet must be zero, and the
remaining six bits of the length field limit the label to 63 octets or
less.

To simplify implementations, the total length of a domain name (i.e.,
label octets and label length octets) is restricted to 255 octets or
less.

Although labels can contain any 8 bit values in octets that make up a
label, it is strongly recommended that labels follow the preferred
syntax described elsewhere in this memo, which is compatible with
existing host naming conventions. Name servers and resolvers must
compare labels in a case-insensitive manner (i.e., A=a), assuming ASCII
with zero parity. Non-alphabetic codes must match exactly.
 
User avatar
baragoon
Member Candidate
Member Candidate
Topic Author
Posts: 294
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: Strange symbol in dhcp-hostname

Mon Feb 06, 2017 4:26 pm

 
User avatar
baragoon
Member Candidate
Member Candidate
Topic Author
Posts: 294
Joined: Thu Jan 05, 2017 10:38 am
Location: Kyiv, UA
Contact:

Re: Strange symbol in dhcp-hostname

Tue Feb 07, 2017 8:28 am

tried to extend dhcp-hostname to "playstation" but still seeing cube in winbox and playstation\00 in ssh.

Who is online

Users browsing this forum: DanMos79 and 74 guests