mirror of
https://github.com/syncthing/syncthing.git
synced 2025-12-23 22:18:14 -05:00
fix(beacon): don't join multicast groups on non-multicast interfaces Signed-off-by: Marcus B Spencer <marcus@marcusspencer.us>
This commit is contained in:
@@ -129,6 +129,11 @@ func readMulticasts(ctx context.Context, outbox chan<- recv, addr string) error
|
||||
pconn := ipv6.NewPacketConn(conn)
|
||||
joined := 0
|
||||
for _, intf := range intfs {
|
||||
if intf.Flags&net.FlagMulticast == 0 {
|
||||
slog.DebugContext(ctx, "Not joining multicast group on non-multicast interface", "name", intf.Name, slog.String("flags", intf.Flags.String()))
|
||||
continue
|
||||
}
|
||||
|
||||
err := pconn.JoinGroup(&intf, &net.UDPAddr{IP: gaddr.IP})
|
||||
if err != nil {
|
||||
l.Debugln("IPv6 join", intf.Name, "failed:", err)
|
||||
|
||||
Reference in New Issue
Block a user