函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\hooks.c Create Date:2022-07-27 20:33:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Check if sctp IPv4/IPv6 addresses are valid for binding or connecting* based on their @optname.

函数原型:static int selinux_sctp_bind_connect(struct sock *sk, int optname, struct sockaddr *address, int addrlen)

返回类型:int

参数:

类型参数名称
struct sock *sk
intoptname
struct sockaddr *address
intaddrlen
5276  err等于0, walk_size等于0
5281  如果非selinux_policycap_extsockclass()则返回:0
5285  sock等于sk_socket
5286  addr_buf等于address
5288 walk_size小于addrlen循环
5289  如果walk_sizesizeof(sa_family_t)大于addrlen则返回:负EINVAL
5292  addr等于addr_buf
5294  :address family, AF_xxx 恒等于Supported address families.
5296  len等于sizeof(structsockaddr_in)
5297  退出
5299  len等于sizeof(structsockaddr_in6)
5300  退出
5301  默认
5302  返回:负EINVAL
5305  如果walk_sizelen大于addrlen则返回:负EINVAL
5308  err等于负EINVAL
5311  :optname恒等于SCTP_PRIMARY_ADDR
5312  :optname恒等于SCTP_SET_PEER_PRIMARY_ADDR
5315  退出
5317  :optname恒等于CONNECTX requests.
5318  :optname恒等于SCTP_PARAM_SET_PRIMARY
5319  :optname恒等于SCTP_PARAM_ADD_IP
5322  如果err则返回:err
5337  退出
5340  如果err则返回:err
5343  addr_buf加等于len
5344  walk_size加等于len
5347  返回:0