Skip to content

Commit

Permalink
bpf: host: add drop notify for missed POLICY_EGRESSCALL_MAP tail-call
Browse files Browse the repository at this point in the history
We're returning a DROP reason, but nothing outside do_netdev() creates the
corresponding drop notification from it.

Signed-off-by: Julian Wiedmann <jwi@isovalent.com>
  • Loading branch information
julianwiedmann authored and aanm committed May 12, 2023
1 parent 37d5264 commit f601b4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bpf/bpf_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,8 @@ do_netdev(struct __ctx_buff *ctx, __u16 proto, const bool from_host)

ctx->mark = 0;
tail_call_dynamic(ctx, &POLICY_EGRESSCALL_MAP, lxc_id);
return DROP_MISSED_TAIL_CALL;
return send_drop_notify_error(ctx, identity, DROP_MISSED_TAIL_CALL,
CTX_ACT_DROP, METRIC_EGRESS);
}
}
#endif
Expand Down

0 comments on commit f601b4c

Please sign in to comment.