Skip to content

Commit

Permalink
android 11 suppored
Browse files Browse the repository at this point in the history
  • Loading branch information
suutaku committed Jan 1, 2024
1 parent 31fe7de commit ca3f325
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ go 1.12
require (
github.com/pion/logging v0.2.2
github.com/stretchr/testify v1.8.4
github.com/wlynxg/anet v0.0.1
golang.org/x/net v0.19.0
golang.org/x/sys v0.15.0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
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.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
Expand Down
5 changes: 3 additions & 2 deletions stdnet/net.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"net"

"github.com/pion/transport/v3"
"github.com/wlynxg/anet"
)

const (
Expand Down Expand Up @@ -38,15 +39,15 @@ var _ transport.Net = &Net{}
func (n *Net) UpdateInterfaces() error {
ifs := []*transport.Interface{}

oifs, err := net.Interfaces()
oifs, err := anet.Interfaces()
if err != nil {
return err
}

for _, oif := range oifs {
ifc := transport.NewInterface(oif)

addrs, err := oif.Addrs()
addrs, err := anet.InterfaceAddrsByInterface(&oif)

Check failure on line 50 in stdnet/net.go

View workflow job for this annotation

GitHub Actions / lint / Go

G601: Implicit memory aliasing in for loop. (gosec)
if err != nil {
return err
}
Expand Down

0 comments on commit ca3f325

Please sign in to comment.