Skip to content

Commit

Permalink
replace hard-coded queue ID with queried queue ID
Browse files Browse the repository at this point in the history
  • Loading branch information
arctic-alpaca committed Nov 13, 2024
1 parent dca68ae commit 0ca10c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/integration-ebpf/src/redirect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub fn redirect_sock(ctx: XdpContext) -> u32 {
// Check whether incoming packet's queue ID matches the queue ID of the socket in XSKMAP at index `queue_id`.
if SOCKS.get(queue_id) == Some(queue_id) {
// Queue ID matches, redirect to AF_XDP socket.
SOCKS.redirect(0, 0).unwrap_or(xdp_action::XDP_ABORTED)
SOCKS.redirect(queue_id, 0).unwrap_or(xdp_action::XDP_ABORTED)
} else {
// Queue ID did not match, pass packet to kernel network stack.
xdp_action::XDP_PASS
Expand Down

0 comments on commit 0ca10c8

Please sign in to comment.