patch-2.1.53 linux/net/x25/af_x25.c

Next file: linux/Documentation/networking/Configurable
Previous file: linux/net/unix/af_unix.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.52/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
@@ -423,7 +423,7 @@
 	struct sock *sk;
 	x25_cb *x25;
 
-	if ((sk = sk_alloc(GFP_ATOMIC)) == NULL)
+	if ((sk = sk_alloc(AF_X25, GFP_ATOMIC)) == NULL)
 		return NULL;
 
 	if ((x25 = kmalloc(sizeof(*x25), GFP_ATOMIC)) == NULL) {
@@ -523,16 +523,6 @@
 	return sk;
 }
 
-static int x25_dup(struct socket *newsock, struct socket *oldsock)
-{
-	struct sock *sk = oldsock->sk;
-
-	if (sk == NULL || newsock == NULL)
-		return -EINVAL;
-
-	return x25_create(newsock, sk->protocol);
-}
-
 static int x25_release(struct socket *sock, struct socket *peer)
 {
 	struct sock *sk = sock->sk;
@@ -682,11 +672,6 @@
 	return 0;
 }
 	
-static int x25_socketpair(struct socket *sock1, struct socket *sock2)
-{
-	return -EOPNOTSUPP;
-}
-
 static int x25_accept(struct socket *sock, struct socket *newsock, int flags)
 {
 	struct sock *sk;
@@ -1254,11 +1239,11 @@
 static struct proto_ops x25_proto_ops = {
 	AF_X25,
 
-	x25_dup,
+	sock_no_dup,
 	x25_release,
 	x25_bind,
 	x25_connect,
-	x25_socketpair,
+	sock_no_socketpair,
 	x25_accept,
 	x25_getname,
 	datagram_poll,


FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov