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

wrong ip address used when discovering device via bonjour when using mDNS repeater #52

Open
sven-petersen opened this issue May 1, 2021 · 0 comments
Assignees

Comments

@sven-petersen
Copy link

Hello,

I have two seperate VLANs/subnets. Where the raumserver is one (ip range 10.10.20.x/24) and the Raumfeld Host is in another subnet (10.10.10.x/24). As mDNS (used by bonjour) by default only looks for devices (via multicast) in its own subnet you have to create some sort of bridge between those two subnets - the mDNS-repeater (the repeater runs on the router an has the IP 10.10.10.1 and 10.10.20.1). It will basically just forward (repeat) mDNS lookups as well as responses from one subnet to the other. In this setup an mDNS/bonjour response looks like so:

{
  "addresses": [
    "10.10.10.106"
  ],
  "host": "stereo-l.local",
  "referer": {
    "address": "10.10.20.1",
    "family": "IPv4",
    "port": 5353,
    "size": 203
  },
  "port": 47365,
  ...
}

The correct IP of the host is the one at the top (10.10.10.106). But in the code the IP from the referer is used, which in this case is the repeater and not the actual Raumfeld device. Hence "connecting" to the device fails.

Not sure if there are cases tho were using an address from the addresses-array might not work or where those are wrong. But would it make sense to just change the code to the following?

self.deviceFound(_service.addresses[0], _service.fqdn, _service, "BONJOUR")       
@ChriD ChriD self-assigned this Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants