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: clean up some revalidate_data() users #25337

Merged
merged 3 commits into from
Jun 10, 2023
Merged
Changes from 1 commit
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
10 changes: 0 additions & 10 deletions bpf/bpf_lxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1544,13 +1544,8 @@ ipv6_policy(struct __ctx_buff *ctx, int ifindex, __u32 src_label,
&ct_state_new, *proxy_port > 0, false, ext_err);
if (IS_ERR(ret))
return ret;

/* NOTE: tuple has been invalidated after this */
}

if (!revalidate_data(ctx, &data, &data_end, &ip6))
julianwiedmann marked this conversation as resolved.
Show resolved Hide resolved
return DROP_INVALID;

reason = (enum trace_reason)*ct_status;
if (*proxy_port > 0) {
send_trace_notify6(ctx, TRACE_TO_PROXY, src_label, SECLABEL, &orig_sip,
Expand Down Expand Up @@ -1872,13 +1867,8 @@ ipv4_policy(struct __ctx_buff *ctx, int ifindex, __u32 src_label, enum ct_status
&ct_state_new, *proxy_port > 0, false, ext_err);
if (IS_ERR(ret))
return ret;

/* NOTE: tuple has been invalidated after this */
}

if (!revalidate_data(ctx, &data, &data_end, &ip4))
return DROP_INVALID;

reason = (enum trace_reason)*ct_status;
if (*proxy_port > 0) {
send_trace_notify4(ctx, TRACE_TO_PROXY, src_label, SECLABEL, orig_sip,
Expand Down