Set interface index in BPF attributes.

This commit is contained in:
gamemann
2021-11-12 19:55:25 +00:00
parent ccd4f921bf
commit 56831eed67

View File

@@ -145,6 +145,7 @@ int loadbpfobj(const char *filename, int ifidx)
struct bpf_prog_load_attr attrs = struct bpf_prog_load_attr attrs =
{ {
.prog_type = BPF_PROG_TYPE_XDP, .prog_type = BPF_PROG_TYPE_XDP,
.ifindex = ifidx,
}; };
attrs.file = filename; attrs.file = filename;