From 27a9d0f5701cabbc9a7a2d345a35f6f1944277b6 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 16 Aug 2019 10:16:37 +0100 Subject: [PATCH] serve dlna: only select interfaces which can multicast for SSDP Before this change we used all UP interfaces - now we need the interfaces to be UP and MULTICAST capable. See: https://forum.rclone.org/t/error-using-rclone-serve-dlna-on-termux/11083 --- cmd/serve/dlna/dlna_util.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/serve/dlna/dlna_util.go b/cmd/serve/dlna/dlna_util.go index b5d2b4127..45c6087cc 100644 --- a/cmd/serve/dlna/dlna_util.go +++ b/cmd/serve/dlna/dlna_util.go @@ -47,10 +47,9 @@ func listInterfaces() []net.Interface { var active []net.Interface for _, intf := range ifs { - if intf.Flags&net.FlagUp == 0 || intf.MTU <= 0 { - continue + if intf.Flags&net.FlagUp != 0 && intf.Flags&net.FlagMulticast != 0 && intf.MTU > 0 { + active = append(active, intf) } - active = append(active, intf) } return active }