Lines Matching refs:family
2261 static int smack_sk_alloc_security(struct sock *sk, int family, gfp_t gfp_flags) in smack_sk_alloc_security() argument
2497 ad.a.u.net->family = sap->sin_family; in smk_ipv4_check()
2536 ad.a.u.net->family = PF_INET6; in smk_ipv6_check()
2778 static int smack_socket_post_create(struct socket *sock, int family, in smack_socket_post_create() argument
2795 if (family != PF_INET) in smack_socket_post_create()
3895 static struct smack_known *smack_from_netlbl(const struct sock *sk, u16 family, in smack_from_netlbl() argument
3907 if (netlbl_skbuff_getattr(skb, family, &secattr) == 0) { in smack_from_netlbl()
3910 netlbl_cache_add(skb, family, &skp->smk_netlabel); in smack_from_netlbl()
3931 u16 family = sk->sk_family; in smack_socket_sock_rcv_skb() local
3939 if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP)) in smack_socket_sock_rcv_skb()
3940 family = PF_INET; in smack_socket_sock_rcv_skb()
3943 switch (family) { in smack_socket_sock_rcv_skb()
3952 skp = smack_from_netlbl(sk, family, skb); in smack_socket_sock_rcv_skb()
3959 ad.a.u.net->family = family; in smack_socket_sock_rcv_skb()
3973 netlbl_skbuff_err(skb, family, rc, 0); in smack_socket_sock_rcv_skb()
3992 ad.a.u.net->family = family; in smack_socket_sock_rcv_skb()
4064 int family = PF_UNSPEC; in smack_socket_getpeersec_dgram() local
4069 family = PF_INET; in smack_socket_getpeersec_dgram()
4072 family = PF_INET6; in smack_socket_getpeersec_dgram()
4075 if (family == PF_UNSPEC && sock != NULL) in smack_socket_getpeersec_dgram()
4076 family = sock->sk->sk_family; in smack_socket_getpeersec_dgram()
4078 switch (family) { in smack_socket_getpeersec_dgram()
4094 skp = smack_from_netlbl(sk, family, skb); in smack_socket_getpeersec_dgram()
4147 u16 family = sk->sk_family; in smack_inet_conn_request() local
4160 if (family == PF_INET6) { in smack_inet_conn_request()
4167 family = PF_INET; in smack_inet_conn_request()
4180 skp = smack_from_netlbl(sk, family, skb); in smack_inet_conn_request()
4187 ad.a.u.net->family = family; in smack_inet_conn_request()