aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/auth_unix.c')
-rw-r--r--net/sunrpc/auth_unix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c
index 5622783011a4..e54782e75d59 100644
--- a/net/sunrpc/auth_unix.c
+++ b/net/sunrpc/auth_unix.c
@@ -41,7 +41,7 @@ unx_create(struct rpc_clnt *clnt, rpc_authflavor_t flavor)
41{ 41{
42 dprintk("RPC: creating UNIX authenticator for client %p\n", 42 dprintk("RPC: creating UNIX authenticator for client %p\n",
43 clnt); 43 clnt);
44 if (atomic_inc_return(&unix_auth.au_count) == 0) 44 if (atomic_inc_return(&unix_auth.au_count) == 1)
45 unix_cred_cache.nextgc = jiffies + (unix_cred_cache.expire >> 1); 45 unix_cred_cache.nextgc = jiffies + (unix_cred_cache.expire >> 1);
46 return &unix_auth; 46 return &unix_auth;
47} 47}
sion = 0; /* special case: mgmt socket */ if(connect(kernel_fd, (struct sockaddr *)&sax, sizeof(sax) ) < 0 ) { perror("connect failed"); result = -errno; goto err; } } 2. Create session PPPoX data socket struct sockaddr_pppol2tp sax; int fd; /* Note, the target socket must be bound already, else it will not be ready */ sax.sa_family = AF_PPPOX; sax.sa_protocol = PX_PROTO_OL2TP; sax.pppol2tp.fd = tunnel_fd; sax.pppol2tp.addr.sin_addr.s_addr = addr->sin_addr.s_addr; sax.pppol2tp.addr.sin_port = addr->sin_port; sax.pppol2tp.addr.sin_family = AF_INET; sax.pppol2tp.s_tunnel = tunnel_id; sax.pppol2tp.s_session = session_id; sax.pppol2tp.d_tunnel = peer_tunnel_id; sax.pppol2tp.d_session = peer_session_id; /* session_fd is the fd of the session's PPPoL2TP socket. * tunnel_fd is the fd of the tunnel UDP socket. */ fd = connect(session_fd, (struct sockaddr *)&sax, sizeof(sax)); if (fd < 0 ) { return -errno; } return 0; Miscellanous ============ The PPPoL2TP driver was developed as part of the OpenL2TP project by Katalix Systems Ltd. OpenL2TP is a full-featured L2TP client / server, designed from the ground up to have the L2TP datapath in the kernel. The project also implemented the pppol2tp plugin for pppd which allows pppd to use the kernel driver. Details can be found at http://openl2tp.sourceforge.net.