Skip to content

Commit ed99f2b

Browse files
committed
Fix dns labels/names size limits
1 parent dea4f35 commit ed99f2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/net/dns/names/names.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def dn_expand(packet,offset)
4646
end
4747

4848
def pack_name(name)
49-
if name.size > 63
50-
raise ArgumentError, "Label data cannot exceed 63 chars"
49+
if name.size > 255
50+
raise ArgumentError, "Name data cannot exceed 255 chars"
5151
end
5252
arr = name.split(".")
5353
str = ""

0 commit comments

Comments
 (0)