History

bpf: add sk_msg prog sk access tests to test_verifier

Add tests for BPF_PROG_TYPE_SK_MSG to test_verifier for read access to new sk fields.

John Fastabend committed 8 years ago

Commit 4da0dca1 parent 303def32 files · +123 −0Browse files

Showing the changes to tools/include/uapi/linux (1 of 2 files). Show all

Unified · Split

tools/include/uapi/linux/bpf.h+8−0
@@ -2176,6 +2176,14 @@ enum sk_action { · 2175 unmodified lines
21762176 struct sk_msg_md {
21772177 void *data;
21782178 void *data_end;
2179+
2180+ __u32 family;
2181+ __u32 remote_ip4; /* Stored in network byte order */
2182+ __u32 local_ip4; /* Stored in network byte order */
2183+ __u32 remote_ip6[4]; /* Stored in network byte order */
2184+ __u32 local_ip6[4]; /* Stored in network byte order */
2185+ __u32 remote_port; /* Stored in network byte order */
2186+ __u32 local_port; /* stored in host byte order */
21792187 };
21802188
21812189 #define BPF_TAG_SIZE 8