Skip to content

Commit

Permalink
Added NTF_UNSPEC
Browse files Browse the repository at this point in the history
  • Loading branch information
Cellebyte committed Jan 18, 2024
1 parent 091962f commit 631ae17
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ issues:
- path: 'cmd/manager/main.go'
text: "function-length: maximum number of statements per function exceeded; max \\d+ but got \\d+"
# This is very C near and those const values are easier to google.
- path: '(.+)/unix/(coil|frr)\.go'
- path: '(.+)/unix/(coil|frr|nl)\.go'
text: "ST1003: should not use ALL_CAPS in Go names; use CamelCase instead"
- path: '(.+)/unix/(coil|frr)\.go'
- path: '(.+)/unix/(coil|frr|nl)\.go'
text: "var-naming: don't use ALL_CAPS in Go names; use CamelCase"
# fix issues i currently can't fix.
- path: '(.+)\.go'
Expand Down
3 changes: 2 additions & 1 deletion pkg/nl/layer2.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"
"time"

schiff_unix "github.com/telekom/das-schiff-network-operator/pkg/unix"
"github.com/vishvananda/netlink"
"golang.org/x/exp/maps"
"golang.org/x/sys/unix"
Expand Down Expand Up @@ -72,7 +73,7 @@ func getNeighborState(state int) (string, error) {

func getFlags(flag int) (string, error) {
switch flag {
case 0x00:
case schiff_unix.NTF_UNSPEC:
return "", nil
case netlink.NTF_MASTER:
return "permanent", nil
Expand Down
6 changes: 6 additions & 0 deletions pkg/unix/nl.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package unix

const (
// Missing flag documentation in unix.NTF_*.
NTF_UNSPEC = 0x0
)

0 comments on commit 631ae17

Please sign in to comment.