Lines Matching defs:sock

615 	struct socket *sock;
625 sock = rcu_dereference(amt->sock);
626 if (!sock)
632 rt = ip_route_output_ports(amt->net, &fl4, sock->sk,
691 err = ip_local_out(amt->net, sock->sk, skb);
704 struct socket *sock;
714 sock = rcu_dereference(amt->sock);
715 if (!sock)
721 rt = ip_route_output_ports(amt->net, &fl4, sock->sk,
782 err = ip_local_out(amt->net, sock->sk, skb);
1001 struct socket *sock;
1007 sock = rcu_dereference_bh(amt->sock);
1008 if (!sock)
1040 udp_tunnel_xmit_skb(rt, sock->sk, skb,
1060 struct socket *sock;
1066 sock = rcu_dereference_bh(amt->sock);
1067 if (!sock)
1097 udp_tunnel_xmit_skb(rt, sock->sk, skb,
1115 struct socket *sock;
1120 sock = rcu_dereference_bh(amt->sock);
1121 if (!sock)
1155 udp_tunnel_xmit_skb(rt, sock->sk, skb,
2552 struct socket *sock;
2562 sock = rcu_dereference(amt->sock);
2563 if (!sock)
2569 rt = ip_route_output_ports(amt->net, &fl4, sock->sk,
2629 err = ip_local_out(amt->net, sock->sk, skb);
2767 static int amt_rcv(struct sock *sk, struct sk_buff *skb)
2903 static int amt_err_lookup(struct sock *sk, struct sk_buff *skb)
2945 struct socket *sock;
2954 err = udp_sock_create(net, &udp_conf, &sock);
2958 return sock;
2964 struct socket *sock;
2966 sock = amt_create_sock(amt->net, amt->relay_port);
2967 if (IS_ERR(sock))
2968 return PTR_ERR(sock);
2977 setup_udp_tunnel_sock(amt->net, sock, &tunnel_cfg);
2979 rcu_assign_pointer(amt->sock, sock);
3017 struct socket *sock;
3026 sock = rtnl_dereference(amt->sock);
3027 RCU_INIT_POINTER(amt->sock, NULL);
3029 if (sock)
3030 udp_tunnel_sock_release(sock);