Skip to content

Commit

Permalink
localIPv4MCastAddrs if(net.FlagUp == 0 )continue
Browse files Browse the repository at this point in the history
  • Loading branch information
fanhai authored and huin committed Mar 10, 2021
1 parent e7fc2c5 commit 0ca7630
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion network.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func localIPv4MCastAddrs() ([]string, error) {
// Find the set of addresses to listen on.
var addrs []string
for _, iface := range ifaces {
if iface.Flags&net.FlagMulticast == 0 || iface.Flags&net.FlagLoopback != 0 {
if iface.Flags&net.FlagMulticast == 0 || iface.Flags&net.FlagLoopback != 0 || iface.Flags&net.FlagUp == 0 {
// Does not support multicast or is a loopback address.
continue
}
Expand Down

0 comments on commit 0ca7630

Please sign in to comment.