Peer names too long

I have a peer in my organization that has created a DNS label that is too long. We have an internal app that queries for TXT records from _peer.internal, then tries to connect (and thus perform AAAA lookup) on the results. One of our developers has been registered with a peer name that is longer than 63 characters. For example:

$ dig _peer.internal TXT +short
"static-laptop1-user-domain-io-JA2YPXR53PAZRC77XG7FK8C6RO,static-a-long-machine-name1-a-surname-emaildomainname-com-H2MYMUX5V3BNU7Z19HFUAG7X22,static-my-hostname-me-domain-com-CNPWZ6KR2L4CDIMKZ60RVLH917,..."

$ dig static-laptop1-user-domain-io-JA2YPXR53PAZRC77XG7FK8C6RO._peer.internal AAAA +short
fdaa:12:3456:789:abcd:0:a:100

$ dig static-a-long-machine-name1-a-surname-emaildomainname-com-H2MYMUX5V3BNU7Z19HFUAG7X22._peer.internal AAAA +short
dig: 'static-a-long-machine-name1-a-surname-emaildomainname-com-H2MYMUX5V3BNU7Z19HFUAG7X22._peer.internal' is not a legal name (label too long)

$ pip install -qq dnspython; python -c 'import dns.resolver; dns.resolver.resolve_at("fdaa:12:3456::3", "static-a-long-machine-name1-a-surname-emaildomainname-com-H2MYMUX5V3BNU7Z19HFUAG7X22._peer.internal", "AAAA")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import dns.resolver; dns.resolver.resolve_at("fdaa:12:3456::3", "static-a-long-machine-name1-a-surname-emaildomainname-com-H2MYMUX5V3BNU7Z19HFUAG7X22._peer.internal", "AAAA")
                         ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/resolver.py", line 1809, in resolve_at
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/resolver.py", line 1309, in resolve
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/resolver.py", line 659, in __init__
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/name.py", line 1069, in from_text
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/_immutable_ctx.py", line 40, in nf
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/_immutable_ctx.py", line 64, in __init__
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/name.py", line 379, in __init__
  File "/tmp/example/.devenv/state/venv/lib/python3.14/site-packages/dns/name.py", line 340, in _validate_labels
    raise LabelTooLong

dns.name.LabelTooLong: A DNS label is > 63 octets long.

I don’t have a paid support plan, so all I can do is post here, but this feels like a bug in the peer discovery networking on the fly platform. Can anyone else confirm this? I’d love to see fly truncate names that are too long (the non-redacted peer name I’m dealing with is 83 characters) at a platform level, so that all 6pn DNS labels are actually valid.

2 Likes

this is definitely a bug, we’ll get it fixed. thanks for the report!

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.