History

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.

Mark Pashmfouroush committed 5 years ago

Commit f8931561 parent 1a8b5978 files · +30 −18Browse files

Showing the changes to include/uapi (1 of 8 files). Show all

Unified · Split

include/uapi/linux/bpf.h+1−0
@@ -6316,6 +6316,7 @@ struct bpf_sk_lookup { · 6315 unmodified lines
63166316 __u32 local_ip4; /* Network byte order */
63176317 __u32 local_ip6[4]; /* Network byte order */
63186318 __u32 local_port; /* Host byte order */
6319+ __u32 ingress_ifindex; /* The arriving interface. Determined by inet_iif. */
63196320 };
63206321
63216322 /*