preserve-dscp: Adjust for newer libbpf API

‘bpf_map__next’ is deprecated: libbpf v0.7+:
 use bpf_object__next_map() instead

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This commit is contained in:
Jesper Dangaard Brouer
2022-09-02 15:43:29 +02:00
parent 08161febd1
commit 04db7bd740
2 changed files with 2 additions and 1 deletions

View File

@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
return err;
}
while ((map = bpf_map__next(map, obj))) {
while ((map = bpf_object__next_map(obj, map))) {
if (strstr(bpf_map__name(map), ".rodata")) {
int ip_only = (iftype == ARPHRD_NONE);
bpf_map__set_initial_value(map, &ip_only, sizeof(ip_only));