Skip to content

Commit

Permalink
Make new_ack_seq always inline
Browse files Browse the repository at this point in the history
Fixes "function calls are not allowed while holding a lock"
  • Loading branch information
hack3ric committed Mar 28, 2024
1 parent 4369043 commit b93509b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bpf/ingress.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static inline int restore_data(struct xdp_md* xdp, u16 offset, u32 buf_len) {
return XDP_PASS;
}

static inline u32 new_ack_seq(struct tcphdr* tcp, u16 payload_len) {
static __always_inline u32 new_ack_seq(struct tcphdr* tcp, u16 payload_len) {
return bpf_ntohl(tcp->seq) + payload_len + tcp->syn;
}

Expand Down

0 comments on commit b93509b

Please sign in to comment.