Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpf: nodeport: don't track L2 addr for connection to local backend #24324

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions bpf/lib/nodeport.h
Original file line number Diff line number Diff line change
Expand Up @@ -930,13 +930,14 @@ static __always_inline int nodeport_lb6(struct __ctx_buff *ctx,
return DROP_UNKNOWN_CT;
}

ret = neigh_record_ip6(ctx);
if (ret < 0)
return ret;
if (backend_local) {
ctx_set_xfer(ctx, XFER_PKT_NO_SVC);
return CTX_ACT_OK;
}

ret = neigh_record_ip6(ctx);
if (ret < 0)
return ret;
}

/* TX request to remote backend: */
Expand Down Expand Up @@ -2078,13 +2079,14 @@ static __always_inline int nodeport_lb4(struct __ctx_buff *ctx,
return DROP_UNKNOWN_CT;
}

ret = neigh_record_ip4(ctx);
if (ret < 0)
return ret;
if (backend_local) {
ctx_set_xfer(ctx, XFER_PKT_NO_SVC);
return CTX_ACT_OK;
}

ret = neigh_record_ip4(ctx);
if (ret < 0)
return ret;
}

/* TX request to remote backend: */
Expand Down