From de594d7bc183ffcac6e55e7f6fb8f004a40366ca Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Fri, 4 Mar 2022 14:46:48 -0500 Subject: [PATCH] cmd/ndp: ensure interface has multicast Signed-off-by: Matt Layher --- cmd/ndp/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/ndp/main.go b/cmd/ndp/main.go index 062e99b..f84273f 100644 --- a/cmd/ndp/main.go +++ b/cmd/ndp/main.go @@ -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 }