Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:security\selinux\netlabel.c Create Date:2022-07-28 19:17:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:int selinux_netlbl_sctp_assoc_request(struct sctp_endpoint *ep, struct sk_buff *skb)

Type:int

Parameter:

TypeParameterName
struct sctp_endpoint *ep
struct sk_buff *skb
276  sksec = sk_security
280  If sk_family != PF_INET && sk_family != PF_INET6 Then Return 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  If rc != 0 Then Go to assoc_request_return
293  If version == 4 Then
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  Else if IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_IPV6) && version == 6 Then
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  Else
302  rc = -EAFNOSUPPORT
305  If rc == 0 Then 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  Return rc
Caller
NameDescribe
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).