Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't parse packet type 47 is invalid #19

Closed
sebirdman opened this issue Dec 4, 2020 · 15 comments
Closed

Couldn't parse packet type 47 is invalid #19

sebirdman opened this issue Dec 4, 2020 · 15 comments

Comments

@sebirdman
Copy link

Creating bug at request of: librespot-org/librespot#545

running librespot separately like:

/usr/bin/librespot --name Snapcast --bitrate 320 --backend pipe --initial-volume 100 --verbose

Yields:

[2020-12-03T21:05:57Z INFO  librespot] librespot 89cafd7 (2020-11-27). Built on 2020-12-03. Build ID: tnGD7Qeu
[2020-12-03T21:05:57Z DEBUG librespot_connect::discovery] Zeroconf server listening on 0.0.0.0:44899
[2020-12-03T21:06:02Z WARN  libmdns::fsm] couldn't parse packet from 10.10.1.1:5353: type 47 is invalid
[2020-12-03T21:06:02Z WARN  libmdns::fsm] couldn't parse packet from [fe80::dcde:59ff:fe7e:71e5]:5353: type 47 is invalid
[2020-12-03T21:06:03Z WARN  libmdns::fsm] couldn't parse packet from 10.10.1.1:5353: type 47 is invalid
[2020-12-03T21:06:06Z WARN  libmdns::fsm] couldn't parse packet from 10.10.1.1:5353: type 47 is invalid
[2020-12-03T21:06:06Z WARN  libmdns::fsm] couldn't parse packet from [fe80::dcde:59ff:fe7e:71e5]:5353: type 47 is invalid
[2020-12-03T21:06:11Z WARN  libmdns::fsm] couldn't parse packet from 10.10.1.1:5353: type 47 is invalid
[2020-12-03T21:06:14Z WARN  libmdns::fsm] couldn't parse packet from 10.10.1.1:5353: type 47 is invalid
[2020-12-03T21:06:15Z WARN  libmdns::fsm] couldn't parse packet from 10.10.1.1:5353: type 47 is invalid
[2020-12-03T21:06:15Z WARN  libmdns::fsm] couldn't parse packet from [fe80::dcde:59ff:fe7e:71e5]:5353: type 47 is invalid
[2020-12-03T21:06:16Z WARN  libmdns::fsm] couldn't parse packet from 10.10.1.1:5353: type 47 is invalid

this currently breaks librespot and should be addressed. From @ashthespy:

Type 47 should map to Next Secure record from rfc4034
Would you open up an issue in libmdns for this?

Either way @willstott101 something to consider?

@willstott101
Copy link
Contributor

Hm, atm we're vendoring an old version dns-parser, probably about time we switched, to something maintained.

Candidates are probably: https://crates.io/crates/trust-dns-proto and https://crates.io/crates/dns-message-parser

I might also investigate using a higher-level library like https://crates.io/crates/trust-dns-client making libmdns be a completely minimal wrapper to simplify usage.

@ashthespy
Copy link
Member

Ah, I was under the impression it was a written by @plietar back in the day, but now see it's actually a fork of tailhook/dns-parser.

Wouldn't it be less work to just add this record into

pub enum Type {
/// a host addresss
A = 1,
/// an authoritative name server

And since we (librespot) don't actively parse this packet, it would just fall into the Unknown RData? But then again, my knowledge here is next to nil :-D

@willstott101
Copy link
Contributor

I'll have to check but I'd assumed we already ignoring this packet, so all that would do is stop the logging (which is probably helpful anyway). The original issue is about a failure in the discovery of the librespot service, which implies this 47 might be something to respond to.

@sebirdman
Copy link
Author

@willstott101 i may have misdiagnosed the issue, as i thought this message was breaking things for me.

@2opremio
Copy link

I am still getting these error messages.

couldn't parse packet from 10.10.20.61:5353: type 47 is invalid
couldn't parse packet from 10.10.20.63:5353: type 47 is invalid
couldn't parse packet from 10.10.20.64:5353: type 47 is invalid
couldn't parse packet from 10.10.20.57:5353: type 47 is invalid

@rindlerblabla
Copy link

rindlerblabla commented Jan 12, 2022

So do I. Those messages started when I moved my snapserver, which uses librespot, to another VLAN/subnet.

@2opremio
Copy link

I got rid of the problem by switching to avahi in librespot.

@eljojo
Copy link

eljojo commented Mar 7, 2022

@2opremio could you explain how?

@2opremio
Copy link

2opremio commented Mar 7, 2022

Enable the "with-dns-sd" feature form librespot

@jonathanicq
Copy link

@2opremio
Can you explain how to do that?

Thank you in advance

@2opremio
Copy link

2opremio commented Mar 26, 2022

It’s a Cargo feature. There are lots of tutorials about how to build Rust projects on the web.

@willstott101
Copy link
Contributor

I've not confirmed this is fixed - didn't intend github to auto close it.

@willstott101 willstott101 reopened this May 8, 2022
@willstott101
Copy link
Contributor

I would appreciate it if someone affected by this could test that the current main branch and see if the solution is as easy as ca9b289.

If that doesn't work, a copy of one of these packets would also be very helpful.

@Gnarflord
Copy link

Hi there,
I can confirm, that this completely fixes the issue for me, thank you so much!

I'm using librespot, a Spotify API player, that communicates to other devices via mdns. If I compile the package with libmdns version=0.6 I'm getting spammed with warnings, as other devices (smart IOT power plugs in my case) use this packet type 47.

If I compile it with version=0.7 I get no warnings at all, while previously about >1000 daily warning messages ended in my journal :))

@willstott101
Copy link
Contributor

That's great. Thanks for confirming, and for the librespot PR.

delneet added a commit to delneet/snapcast-docker that referenced this issue Jun 1, 2022
This should fix issues with libmdns not being able to resolve packages from other network subnets.
As described here librespot-org/libmdns#19
lukashass pushed a commit to lukashass/snapcast that referenced this issue Jun 3, 2022
This should fix issues with libmdns not being able to resolve packages from other network subnets.
As described here librespot-org/libmdns#19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants