mirror of https://github.com/vishvananda/netlink
Don't overwrite the XDP file descriptor with flags
This commit is contained in:
parent
d4235bfaae
commit
3ff4c21961
|
@ -2011,6 +2011,7 @@ func addXdpAttrs(xdp *LinkXdp, req *nl.NetlinkRequest) {
|
||||||
native.PutUint32(b, uint32(xdp.Fd))
|
native.PutUint32(b, uint32(xdp.Fd))
|
||||||
nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FD, b)
|
nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FD, b)
|
||||||
if xdp.Flags != 0 {
|
if xdp.Flags != 0 {
|
||||||
|
b := make([]byte, 4)
|
||||||
native.PutUint32(b, xdp.Flags)
|
native.PutUint32(b, xdp.Flags)
|
||||||
nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FLAGS, b)
|
nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FLAGS, b)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue