[LEDE-DEV] [PATCH mdns] Fix sending replies to PTR questions

Cristian Morales Vega cristian at samknows.com
Wed May 31 02:42:41 PDT 2017


On 10 May 2017 at 13:44, Rafał Miłecki <zajec5 at gmail.com> wrote:
> On 10 May 2017 at 14:20, Cristian Morales Vega <cristian at samknows.com> wrote:
>>> On 10 May 2017 at 13:14, Rafał Miłecki <zajec5 at gmail.com> wrote:
>>>> After reading your comment & analyzing the code: yes. I expect this to break
>>>> support for queries you mentioned.
>>>>
>>>> My problem is that even without this commit or my local fix avahi-browse
>>>> still doesn't detect services announced by umdns. I can see answers being
>>>> sent so I assume there is something wrong with them.
>>>>
>>>> I've to debug it further.
>>
>> See http://lists.infradead.org/pipermail/lede-dev/2017-April/007177.html
>> and http://lists.infradead.org/pipermail/lede-dev/2017-April/007188.html
>> (yes, I have to improve my email workflow... and I managed to top-post before!)
>>
>> With those patches it works for me.
>
> Tip of the day: opening UDP port 5353 may help.
>
> Sorry for that mistake. I can see this working now.

This definitively still fails for me with an iPad as per
http://lists.infradead.org/pipermail/lede-dev/2017-April/007188.html

This is what I see

09:18:53.732502 IP SamKnowsiPadAir.sk.lan.mdns > 224.0.0.251.mdns: 0
[2q] [1au] PTR (QU)? _skhttp._tcp.local. PTR (QU)?
_skjitter._tcp.local. (81)
09:18:53.732776 IP 10.0.2.186.mdns > SamKnowsiPadAir.sk.lan.mdns: 0*-
[0q] 1/0/0 PTR SKWB8-d8:37:be:f8:21:25._skhttp._tcp.local. (86)
09:18:53.732859 IP 10.0.2.186.mdns > SamKnowsiPadAir.sk.lan.mdns: 0*-
[0q] 2/0/0 SRV SKWB8-d8:37:be:f8:21:25.local.:6500 5971 19287, TXT
"daemon=skhttp_server" (178)
09:18:53.732930 IP 10.0.2.186.mdns > SamKnowsiPadAir.sk.lan.mdns: 0*-
[0q] 1/0/0 PTR SKWB8-d8:37:be:f8:21:25._skjitter._tcp.local. (90)
09:18:53.732981 IP 10.0.2.186.mdns > SamKnowsiPadAir.sk.lan.mdns: 0*-
[0q] 2/0/0 SRV SKWB8-d8:37:be:f8:21:25.local.:6003 5971 19287, TXT
"daemon=hjitter_server" (183)
09:18:53.734287 IP6 fe80::8f2:45ac:2ef8:a5da.mdns > ff02::fb.mdns: 0
[2q] [1au] PTR (QU)? _skhttp._tcp.local. PTR (QU)?
_skjitter._tcp.local. (81)
09:18:53.866207 IP SamKnowsiPadAir.sk.lan.mdns > 224.0.0.251.mdns: 0
[4q] [1au] SRV (QU)? SKWB8-d8:37:be:f8:21:25._skhttp._tcp.local. TXT
(QU)? SKWB8-d8:37:be:f8:21:25._skhttp._tcp.local. SRV (QU)?
SKWB8-d8:37:be:f8:21:25._skjitter._tcp.local. TXT (QU)?
SKWB8-d8:37:be:f8:21:25._skjitter._tcp.local. (141)
09:18:53.866919 IP6 fe80::8f2:45ac:2ef8:a5da.mdns > ff02::fb.mdns: 0
[4q] [1au] SRV (QU)? SKWB8-d8:37:be:f8:21:25._skhttp._tcp.local. TXT
(QU)? SKWB8-d8:37:be:f8:21:25._skhttp._tcp.local. SRV (QU)?
SKWB8-d8:37:be:f8:21:25._skjitter._tcp.local. TXT (QU)?
SKWB8-d8:37:be:f8:21:25._skjitter._tcp.local. (141)

The iPad seems to expect the PTR and SRV records in the same packet
(12.1 from RFC6763 says they "should", not "must") and since the SRV
is not there it ends up asking for it... and not noticing we have sent
it before in a different packet.

So we need to handle SRV questions
(http://lists.infradead.org/pipermail/lede-dev/2017-April/007177.html).
But that's not enough because there is a timeout
(http://lists.infradead.org/pipermail/lede-dev/2017-April/007179.html),
which I am still not sure should be there.


-- 
Cristian Morales Vega

Email cristian at samknows.com
Office +44 (0) 20 3111 4330
Web:  www.samknows.com


This email is sent for and on behalf of SamKnows Limited.

This email and any attachments are confidential, legally privileged
and protected by copyright. If you are not the intended recipient
dissemination or copying of this email is prohibited. If you have
received this in error, please notify the sender by replying by email
and then delete the email completely from your system.

SamKnows Limited, Registered Number: 06510477, Registered Office: Hill
House, 1 Little New Street, London, EC4A 3TR. Registered in England
and Wales. Trade Mark 2507103



More information about the Lede-dev mailing list