Skip to content

TXT records with periods in them are mistaken for multiple txt records #84

@haakonnessjoen

Description

@haakonnessjoen

As previously defined in closed issue #70:

TXT records are split if they have periods in the value part. This is allowed by spec, as all 8bit values should be allowed after =.

		this.advertisement = mdns.createAdvertisement(mdns.tcp('myproto'), 1234, {
			name: 'myproto-app',
			txt: {
				protocol_version: '1.0.0',
				network_uid: this.options.network_uid || '',
				application_name: this.options.applicationName
			}
		});

The resulting record is:

{ addresses: [ '10.0.0.x' ],
  query: [],
  port: 1234,
  fullname: 'myproto-app._myproto._tcp.local',
  txt:
   [ 'protocol_version=1',
     '0',
     '0',
     'network_uid=abcdef0123456',
     'application_name=my-testscript' ],
  type:
   [ { name: 'myproto',
       protocol: 'tcp',
       subtypes: [],
       description: undefined },
     { name: 'myproto',
       protocol: 'tcp',
       subtypes: [],
       description: undefined } ],
  host: 'myproto-app.local',
  interfaceIndex: 1,
  networkInterface: 'pseudo multicast' }

As you see, protocol version should be protocol_version=1.0.0, but instead it is incorrectly split up in multiple txt records.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions