summaryrefslogtreecommitdiff
path: root/vendor/github.com/vishvananda/netlink/protinfo_linux.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/vishvananda/netlink/protinfo_linux.go')
-rw-r--r--vendor/github.com/vishvananda/netlink/protinfo_linux.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/github.com/vishvananda/netlink/protinfo_linux.go b/vendor/github.com/vishvananda/netlink/protinfo_linux.go
index 10dd0d533..43c465f05 100644
--- a/vendor/github.com/vishvananda/netlink/protinfo_linux.go
+++ b/vendor/github.com/vishvananda/netlink/protinfo_linux.go
@@ -5,6 +5,7 @@ import (
"syscall"
"github.com/vishvananda/netlink/nl"
+ "golang.org/x/sys/unix"
)
func LinkGetProtinfo(link Link) (Protinfo, error) {
@@ -15,10 +16,10 @@ func (h *Handle) LinkGetProtinfo(link Link) (Protinfo, error) {
base := link.Attrs()
h.ensureIndex(base)
var pi Protinfo
- req := h.newNetlinkRequest(syscall.RTM_GETLINK, syscall.NLM_F_DUMP)
- msg := nl.NewIfInfomsg(syscall.AF_BRIDGE)
+ req := h.newNetlinkRequest(unix.RTM_GETLINK, unix.NLM_F_DUMP)
+ msg := nl.NewIfInfomsg(unix.AF_BRIDGE)
req.AddData(msg)
- msgs, err := req.Execute(syscall.NETLINK_ROUTE, 0)
+ msgs, err := req.Execute(unix.NETLINK_ROUTE, 0)
if err != nil {
return pi, err
}
@@ -33,7 +34,7 @@ func (h *Handle) LinkGetProtinfo(link Link) (Protinfo, error) {
return pi, err
}
for _, attr := range attrs {
- if attr.Attr.Type != syscall.IFLA_PROTINFO|syscall.NLA_F_NESTED {
+ if attr.Attr.Type != unix.IFLA_PROTINFO|unix.NLA_F_NESTED {
continue
}
infos, err := nl.ParseRouteAttr(attr.Value)