mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
selinux: use a consistent method to get full socket from skb
In order to maintain code consistency and readability, skb_to_full_sk() is used to get full socket from skb. Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com> Acked-by: Stephen Smalley <stephen.smalley.work@gmail.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
committed by
Paul Moore
parent
5f9383bd41
commit
d4e8dc8e8b
@@ -5885,7 +5885,7 @@ static unsigned int selinux_ip_output(void *priv, struct sk_buff *skb,
|
||||
/* we do this in the LOCAL_OUT path and not the POST_ROUTING path
|
||||
* because we want to make sure we apply the necessary labeling
|
||||
* before IPsec is applied so we can leverage AH protection */
|
||||
sk = sk_to_full_sk(skb->sk);
|
||||
sk = skb_to_full_sk(skb);
|
||||
if (sk) {
|
||||
struct sk_security_struct *sksec;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user