xref: /linux/tools/testing/selftests/bpf/progs/freplace_connect_v4_prog.c (revision cbecf716ca618fd44feda6bd9a64a8179d031fc5)
1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2020 Facebook
3 
4 #include <linux/stddef.h>
5 #include <linux/ipv6.h>
6 #include <linux/bpf.h>
7 #include <linux/in.h>
8 #include <sys/socket.h>
9 #include <bpf/bpf_helpers.h>
10 #include <bpf/bpf_endian.h>
11 
12 SEC("freplace/connect_v4_prog")
new_connect_v4_prog(struct bpf_sock_addr * ctx)13 int new_connect_v4_prog(struct bpf_sock_addr *ctx)
14 {
15 	// return value thats in invalid range
16 	return 255;
17 }
18 
19 char _license[] SEC("license") = "GPL";
20