mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-22 09:19:06 +08:00
bpf: Add ingress_ifindex to bpf_sk_lookup
It may be helpful to have access to the ifindex during bpf socket lookup. An example may be to scope certain socket lookup logic to specific interfaces, i.e. an interface may be made exempt from custom lookup code. Add the ifindex of the arriving connection to the bpf_sk_lookup API. Signed-off-by: Mark Pashmfouroush <markpash@cloudflare.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20211110111016.5670-2-markpash@cloudflare.com
This commit is contained in:
committed by
Andrii Nakryiko
parent
cfc69268e5
commit
932800b20b
@@ -6316,6 +6316,7 @@ struct bpf_sk_lookup {
|
||||
__u32 local_ip4; /* Network byte order */
|
||||
__u32 local_ip6[4]; /* Network byte order */
|
||||
__u32 local_port; /* Host byte order */
|
||||
__u32 ingress_ifindex; /* The arriving interface. Determined by inet_iif. */
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user