File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -4117,6 +4117,18 @@ static const struct bpf_func_proto bpf_get_socket_cookie_sock_addr_proto = {
4117
4117
.arg1_type = ARG_PTR_TO_CTX ,
4118
4118
};
4119
4119
4120
+ BPF_CALL_1 (bpf_get_socket_cookie_sock , struct sock * , ctx )
4121
+ {
4122
+ return sock_gen_cookie (ctx );
4123
+ }
4124
+
4125
+ static const struct bpf_func_proto bpf_get_socket_cookie_sock_proto = {
4126
+ .func = bpf_get_socket_cookie_sock ,
4127
+ .gpl_only = false,
4128
+ .ret_type = RET_INTEGER ,
4129
+ .arg1_type = ARG_PTR_TO_CTX ,
4130
+ };
4131
+
4120
4132
BPF_CALL_1 (bpf_get_socket_cookie_sock_ops , struct bpf_sock_ops_kern * , ctx )
4121
4133
{
4122
4134
return sock_gen_cookie (ctx -> sk );
@@ -5954,6 +5966,8 @@ sock_filter_func_proto(enum bpf_func_id func_id, const struct bpf_prog *prog)
5954
5966
return & bpf_get_current_uid_gid_proto ;
5955
5967
case BPF_FUNC_get_local_storage :
5956
5968
return & bpf_get_local_storage_proto ;
5969
+ case BPF_FUNC_get_socket_cookie :
5970
+ return & bpf_get_socket_cookie_sock_proto ;
5957
5971
default :
5958
5972
return bpf_base_func_proto (func_id );
5959
5973
}
You can’t perform that action at this time.
0 commit comments