aya: xdp: set flags when attaching with netlink

pull/1/head
Alessandro Decina 4 years ago
parent bb7728a2c5
commit 607cf68a69

@ -104,7 +104,7 @@ impl Xdp {
.data .data
.link(XdpLink::FdLink(FdLink { fd: Some(link_fd) }))) .link(XdpLink::FdLink(FdLink { fd: Some(link_fd) })))
} else { } else {
unsafe { netlink_set_xdp_fd(if_index, prog_fd, None, 0) } unsafe { netlink_set_xdp_fd(if_index, prog_fd, None, flags.bits) }
.map_err(|io_error| XdpError::NetlinkError { io_error })?; .map_err(|io_error| XdpError::NetlinkError { io_error })?;
Ok(self.data.link(XdpLink::NlLink(NlLink { Ok(self.data.link(XdpLink::NlLink(NlLink {

Loading…
Cancel
Save