Don't overwrite the XDP file descriptor with flags

This commit is contained in:
Zvi Effron 2017-12-17 04:18:12 +00:00 committed by Alessandro Boch
parent d4235bfaae
commit 3ff4c21961
1 changed files with 1 additions and 0 deletions

View File

@ -2011,6 +2011,7 @@ func addXdpAttrs(xdp *LinkXdp, req *nl.NetlinkRequest) {
native.PutUint32(b, uint32(xdp.Fd))
nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FD, b)
if xdp.Flags != 0 {
b := make([]byte, 4)
native.PutUint32(b, xdp.Flags)
nl.NewRtAttrChild(attrs, nl.IFLA_XDP_FLAGS, b)
}