Skip to content

Commit

Permalink
change_vector: Modify index to speed up store and sync with kernel-co…
Browse files Browse the repository at this point in the history
…llector repo.
  • Loading branch information
thiagoftsm committed Aug 14, 2023
1 parent 002e66f commit d18dae0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/socket.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ static __always_inline short unsigned int set_idx_value(netdata_socket_idx_t *ns
BPF_CORE_READ_INTO(&nsi->dport, is, sk.__sk_common.skc_dport);
BPF_CORE_READ_INTO(&nsi->sport, is, sk.__sk_common.skc_num);

nsi->dport = bpf_ntohs(nsi->dport);
nsi->sport = bpf_ntohs(nsi->sport);
nsi->dport = nsi->dport;
nsi->sport = nsi->sport;

// Socket for nowhere or system looking for port
// This can be an attack vector that needs to be addressed in another opportunity
Expand Down

0 comments on commit d18dae0

Please sign in to comment.