函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:selinux_netlbl_sctp_assoc_request - Label an incoming sctp association.*@ep: incoming association endpoint.*@skb: the packet.* Description:* A new incoming connection is represented by @ep, ......* Returns zero on success, negative values on failure.

函数原型:int selinux_netlbl_sctp_assoc_request(struct sctp_endpoint *ep, struct sk_buff *skb)

返回类型:int

参数:

类型参数名称
struct sctp_endpoint *ep
struct sk_buff *skb
276  sksec等于sk_security
280  如果sk_family不等于PF_INETsk_family不等于PF_INET6则返回:0
284  lbl_secattr_init - Initialize a netlbl_lsm_secattr struct*@secattr: the struct to initialize* Description:* Initialize an already allocated netlbl_lsm_secattr struct.
285  rc等于security_netlbl_sid_to_secattr( & selinux_state, Security identifiers from incoming (INIT). These are set by * security_sctp_assoc_request(). These will only be used by * SCTP TCP type sockets and peeled off connections as they * cause a new socket to be generated. security_sctp_sk_clone() * will then p, & secattr)
287  如果rc不等于0则转到:assoc_request_return
293  如果version恒等于4则
294  Address family 等于Internet IP Protocol
295  s_addr等于saddr
296  rc等于netlbl_conn_setattr( What socket does this endpoint belong to? , (void * ) & addr4, & secattr)
297  否则如果IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_IPV6)且version恒等于6则
298  AF_INET6 等于IP version 6
299  IPv6 address 等于saddr
300  rc等于netlbl_conn_setattr( What socket does this endpoint belong to? , (void * ) & addr6, & secattr)
301  否则
302  rc等于负EAFNOSUPPORT
305  如果rc恒等于0则nlbl_state等于NLBL_LABELED
308  assoc_request_return :
309  lbl_secattr_destroy - Clears a netlbl_lsm_secattr struct*@secattr: the struct to clear* Description:* Destroys the @secattr struct, including freeing all of the internal buffers.* The struct must be reset with a call to netlbl_secattr_init() before reuse.
310  返回:rc
调用者
名称描述
selinux_sctp_assoc_requestCalled whenever SCTP receives an INIT chunk. This happens when an incoming* connect(2), sctp_connectx(3) or sctp_sendmsg(3) (with no association* already present).