Correct .gbs.conf settings
[platform/adaptation/renesas_rcar/renesas_kernel.git] / net / sunrpc / svcsock.c
index b6e59f0..5e8fe77 100644 (file)
@@ -685,6 +685,7 @@ static struct svc_xprt_class svc_udp_class = {
        .xcl_owner = THIS_MODULE,
        .xcl_ops = &svc_udp_ops,
        .xcl_max_payload = RPCSVC_MAXPAYLOAD_UDP,
+       .xcl_ident = XPRT_TRANSPORT_UDP,
 };
 
 static void svc_udp_init(struct svc_sock *svsk, struct svc_serv *serv)
@@ -1279,6 +1280,7 @@ static struct svc_xprt_class svc_tcp_class = {
        .xcl_owner = THIS_MODULE,
        .xcl_ops = &svc_tcp_ops,
        .xcl_max_payload = RPCSVC_MAXPAYLOAD_TCP,
+       .xcl_ident = XPRT_TRANSPORT_TCP,
 };
 
 void svc_init_xprt_sock(void)
@@ -1397,6 +1399,22 @@ static struct svc_sock *svc_setup_socket(struct svc_serv *serv,
        return svsk;
 }
 
+bool svc_alien_sock(struct net *net, int fd)
+{
+       int err;
+       struct socket *sock = sockfd_lookup(fd, &err);
+       bool ret = false;
+
+       if (!sock)
+               goto out;
+       if (sock_net(sock->sk) != net)
+               ret = true;
+       sockfd_put(sock);
+out:
+       return ret;
+}
+EXPORT_SYMBOL_GPL(svc_alien_sock);
+
 /**
  * svc_addsock - add a listener socket to an RPC service
  * @serv: pointer to RPC service to which to add a new listener