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 摘要。