Merge "NetBpfLoad: prog names are only valid on 4.15+" into main

This commit is contained in:
Treehugger Robot 2024-04-23 04:41:20 +00:00 • committed by Gerrit Code Review
commit 926f012615

View file

@ -1012,7 +1012,7 @@ static int loadCodeSections(const char* elfPath, vector<codeSection>& cs, const
.log_size = static_cast<__u32>(log_buf.size()),
.expected_attach_type = cs[i].expected_attach_type,
};
if (isAtLeastKernelVersion(4, 14, 0))
if (isAtLeastKernelVersion(4, 15, 0))
strlcpy(req.prog_name, cs[i].name.c_str(), sizeof(req.prog_name));
fd.reset(bpf(BPF_PROG_LOAD, req));