Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

Commit

Permalink
removed extraneous syscall from add_if_index()
Browse files Browse the repository at this point in the history
  • Loading branch information
r-caamano committed Dec 12, 2023
1 parent 44767e2 commit 0b53557
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/zfw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,6 @@ int add_if_index(struct interface intf)
if_map.key = (uint64_t)&intf.index;
if_map.flags = BPF_ANY;
if_map.value = (uint64_t)&o_ifip4;
syscall(__NR_bpf, BPF_MAP_LOOKUP_ELEM, &if_map, sizeof(if_map));
for(int x = 0; x < MAX_ADDRESSES; x++){
if(x < intf.addr_count){
o_ifip4.ipaddr[x] = intf.addresses[x];
Expand Down

0 comments on commit 0b53557

Please sign in to comment.