From 0b2718cc19b8566ac055478addc4920d2604cc0b Mon Sep 17 00:00:00 2001 From: vadym Date: Sat, 15 Jun 2024 13:44:01 +0300 Subject: [PATCH] RCL-56 IPv6 milticast Android permission fix --- go.mod | 1 + go.sum | 2 ++ src/multicast/multicast.go | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index fe4fb579f..95737facf 100644 --- a/go.mod +++ b/go.mod @@ -45,6 +45,7 @@ require ( github.com/libp2p/go-buffer-pool v0.0.2 // indirect github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect github.com/rivo/uniseg v0.3.4 // indirect + github.com/wlynxg/anet v0.0.1 // indirect go.uber.org/atomic v1.7.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 1c4e78b86..406f0649e 100644 --- a/go.sum +++ b/go.sum @@ -77,6 +77,8 @@ github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f h1:p4VB7kIXpOQvV github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vorot93/golang-signals v0.0.0-20170221070717-d9e83421ce45 h1:hB/hkjwf3BQnZE6Wk3SBwMJz0NqnGdwXoNzHVSYb0N0= github.com/vorot93/golang-signals v0.0.0-20170221070717-d9e83421ce45/go.mod h1:dfjQkJsG5auteUbnfLIcU72Y/z8tj7DuW9fik8f2Zn0= +github.com/wlynxg/anet v0.0.1 h1:VbkEEgHxPSrRQSiyRd0pmrbcEQAEU2TTb8fb4DmSYoQ= +github.com/wlynxg/anet v0.0.1/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= diff --git a/src/multicast/multicast.go b/src/multicast/multicast.go index 495eb59e6..3bc1f136f 100644 --- a/src/multicast/multicast.go +++ b/src/multicast/multicast.go @@ -11,6 +11,8 @@ import ( "net/url" "time" + "github.com/wlynxg/anet" + "github.com/Arceliar/phony" "github.com/gologme/log" @@ -170,7 +172,7 @@ func (m *Multicast) Interfaces() map[string]net.Interface { func (m *Multicast) _getAllowedInterfaces() map[string]*interfaceInfo { interfaces := make(map[string]*interfaceInfo) // Ask the system for network interfaces - allifaces, err := net.Interfaces() + allifaces, err := anet.Interfaces() if err != nil { // Don't panic, since this may be from e.g. too many open files (from too much connection spam) // TODO? log something