Skip to content

Commit

Permalink
skip network link if it is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Cellebyte committed Apr 22, 2024
1 parent 362a78c commit 3ea0b5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/nl/layer2.go
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ func (n *NetlinkManager) ListNeighborInformation() ([]NeighborInformation, error
for index := range netlinkNeighbors {
linkInfo, err := netlink.LinkByIndex(netlinkNeighbors[index].LinkIndex)
if err != nil {
return nil, fmt.Errorf("error getting link by index: %w", err)
// we don't care if a link is not available
continue
// return nil, fmt.Errorf("error getting link by index: %w", err)
}
interfaceName := linkInfo.Attrs().Name
// This ensures that only neighbors of secondary interfaces are imported
Expand Down

0 comments on commit 3ea0b5e

Please sign in to comment.