anacrolix / anacrolix/dms

Potential issue joining multicast group?

未关闭
#155 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
748
派生
115
PR 合并指标
30 天内没有已合并 PR

描述

Currently debugging an issue potentially with this implementation of SSDP in Golang.

On my current machine, I have no issues with the [Minidlna C implementation](https://github.com/azatoth/minidlna/blob/eff77615abf6087c76647ed57b8878280a6cd215/minissdp.c) joining the `239.255.255.250:1900` socket and receiving multicast broadcasts from **across subnets**.

However, with the same exact interface and calling on this Server in Golang, I only get results for `0.0.0.0:1900` and do not have success with accessing this server like the `239.255.255.250:1900` socket Minidlna has.

Just to be clear, whenever this is ran I only ever get
> `sudo netstat -tulnp | grep 1900`
> udp 0 0 0.0.0.0:1900 0.0.0.0:*

Looking here: https://github.com/anacrolix/dms/blob/07c3224b7ac74c545dbb149e3e79ef78bbf95c2a/ssdp/ssdp.go#L95-L108

Is there any reason there isn't a [JoinGroup](https://pkg.go.dev/golang.org/x/net/ipv4#PacketConn.JoinGroup) used?

e.g.
```
// Bind the multicast group to the interface
if err := p.JoinGroup(&iface, groupAddr); err != nil {
logger.Debugf("Failed to join multicast group: %v", err)
return err
}
```

I haven't had a chance to try to compile a change myself with this repo and then re-implement the library in the other application but wanted to see if there was any decision made with the implementation for this as I haven't been having success as is.

Thanks

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。