Opened 8 years ago

Closed 6 years ago

#10773 closed Patch - Bug Fix (fixed)

backend uses an invalid bonjour service type name

Reported by: George Nassas <gnassas@…> Owned by: stuartm
Priority: minor Milestone: 0.27
Component: MythTV - General Version: 0.25-fixes
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The backend advertises itself as supplying "mythbackend-master" or "mythbackend-slave" service but according to the relevant spec service names are limited to 14 characters (http://www.rfc-editor.org/rfc/rfc6335.txt section 5.1).

The patch changes the service to be "mythbackend" and adds a txt record containing either level='master' or level='slave'.

Guidance for format of the txt record is at http://files.dns-sd.org/draft-cheshire-dnsext-dns-sd.txt in section 6.

Attachments (3)

bonjour-correction.patch (1.3 KB) - added by George Nassas <gnassas@…> 8 years ago.
0005-publish-under-long-and-short-bonjour-service-names.patch (1.9 KB) - added by George Nassas <gnassas@…> 7 years ago.
broadcast long & short service names for packagers who wish to be compatible with all clients
0006-Use-myth-bonjour-object.patch (1.2 KB) - added by George Nassas <gnassas@…> 7 years ago.
update for recent code changes

Download all attachments as: .zip

Change History (9)

Changed 8 years ago by George Nassas <gnassas@…>

Attachment: bonjour-correction.patch added

comment:1 Changed 8 years ago by Raymond Wagner

Owner: set to JYA
Status: newassigned
Version: Unspecified0.25-fixes

comment:2 Changed 7 years ago by SchraderMJ11@…

This is impacting a program I am working on as well. Is this patch going to be applied?

Changed 7 years ago by George Nassas <gnassas@…>

broadcast long & short service names for packagers who wish to be compatible with all clients

Changed 7 years ago by George Nassas <gnassas@…>

update for recent code changes

comment:3 Changed 6 years ago by stuartm

Milestone: unknown0.27
Owner: changed from JYA to stuartm
Status: assignedaccepted

comment:4 Changed 6 years ago by stuartm

The Bonjour documentation indicates a limit of 63 characters for the service name, which is a vast difference from 15 (it's 15 not 14 in that RFC).

Accepting that we need to stick to that 15 char limit that means breaking compatibility with existing clients and if that has to happen, it might as well be in a major release instead of a point release. So I'm inclined to go with your first patch George.

comment:5 Changed 6 years ago by George Nassas <gnassas@…>

So I'm inclined to go with your first patch George.

Thanks. The one change I'd make to that patch is to ditch the goofy "level=master" or "level=slave" bit and just go with a bareword "master" or "slave" in the txt record. After sending in the patch I remembered the convention about how a word on its own implies "=1".

My dual advertisment approach doesn't work anymore. JYA fixed some crashing related to bonjour and after that attempting a second broadcast would hang the server. I didn't look into it.

comment:6 Changed 6 years ago by George Nassas <george@…>

Resolution: fixed
Status: acceptedclosed

In d538503648ae0bf7498870db47a5e7bf0f4cf09d/mythtv:

Make backend's bonjour service name dns-compliant

The master/slave label has been moved into the TXT record to reduce
the service name below the 15 character limit for DNS records. Per RFC 6335

This may break compatibility with some existing clients, but it's necessary
to make it work with many more clients.

Fixes #10773

Signed-off-by: Stuart Morgan <smorgan@…>

Note: See TracTickets for help on using tickets.