Skip to content

Commit

Permalink
cmd/ndp: ensure interface has multicast
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Layher <[email protected]>
  • Loading branch information
mdlayher committed Mar 4, 2022
1 parent 2a2b53c commit de594d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/ndp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ func findInterface(name string) (*net.Interface, error) {
}

for _, ifi := range ifis {
// Is the interface up and not a loopback?
if ifi.Flags&net.FlagUp != 1 || ifi.Flags&net.FlagLoopback != 0 {
// Is the interface up, multicast, and not a loopback?
if ifi.Flags&net.FlagUp == 0 ||
ifi.Flags&net.FlagMulticast == 0 ||
ifi.Flags&net.FlagLoopback != 0 {
continue
}

Expand Down

0 comments on commit de594d7

Please sign in to comment.