On Thu, Sep 24, 2020 at 10:18 AM Andrii Nakryiko <andriin@xxxxxx> wrote: > > Fix regression in libbpf, introduced by XDP link change, which causes XDP > programs to fail to be loaded into kernel due to specified BPF_XDP > expected_attach_type. While kernel doesn't enforce expected_attach_type for > BPF_PROG_TYPE_XDP, some old kernels already support XDP program, but they > don't yet recognize expected_attach_type field in bpf_attr, so setting it to > non-zero value causes program load to fail. > > Luckily, libbpf already has a mechanism to deal with such cases, so just make > expected_attach_type optional for XDP programs. > > Reported-by: Nikita Shirokov <tehnerd@xxxxxxxxxxx> > Reported-by: Udip Pant <udippant@xxxxxx> > Fixes: dc8698cac7aa ("libbpf: Add support for BPF XDP link") > Signed-off-by: Andrii Nakryiko <andriin@xxxxxx> Applied. Thanks Looks like libbpf CI needs to add a few old kernels.