mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
net: initial AF_XDP skeleton
Buildable skeleton of AF_XDP without any functionality. Just what it takes to register a new address family. Signed-off-by: Björn Töpel <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]>
This commit is contained in:
parent
03f5781be2
commit
68e8b849b2
7 changed files with 34 additions and 7 deletions
|
|
@ -1471,7 +1471,9 @@ static inline u16 socket_type_to_security_class(int family, int type, int protoc
|
|||
return SECCLASS_QIPCRTR_SOCKET;
|
||||
case PF_SMC:
|
||||
return SECCLASS_SMC_SOCKET;
|
||||
#if PF_MAX > 44
|
||||
case PF_XDP:
|
||||
return SECCLASS_XDP_SOCKET;
|
||||
#if PF_MAX > 45
|
||||
#error New address family defined, please update this function.
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -240,9 +240,11 @@ struct security_class_mapping secclass_map[] = {
|
|||
{ "manage_subnet", NULL } },
|
||||
{ "bpf",
|
||||
{"map_create", "map_read", "map_write", "prog_load", "prog_run"} },
|
||||
{ "xdp_socket",
|
||||
{ COMMON_SOCK_PERMS, NULL } },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
#if PF_MAX > 44
|
||||
#if PF_MAX > 45
|
||||
#error New address family defined, please update secclass_map.
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue