Changing the svc_create_socket_parameter prototype


Signed-off-by: Aurelien Charbon <aurelien.charbon@ext.bull.net>

 svcsock.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
--------
diff -Nru linux-2.6.12-05h/net/sunrpc/svcsock.c linux-2.6.12-05i/net/sunrpc/svcsock.c
--- linux-2.6.12-05h/net/sunrpc/svcsock.c	2005-06-28 14:03:11.000000000 +0200
+++ linux-2.6.12-05i/net/sunrpc/svcsock.c	2005-06-28 14:03:49.000000000 +0200
@@ -1440,17 +1440,17 @@
  * Create socket for RPC service.
  */
 static int
-svc_create_socket(struct svc_serv *serv, int protocol, struct sockaddr_in *sin)
+svc_create_socket(struct svc_serv *serv, int protocol, struct sockaddr *sin)
 {
 	struct svc_sock	*svsk;
 	struct socket	*sock;
 	int		error;
 	int		type;
+	char		addrbuf[MAX_ADDR_BUF];
 
-	dprintk("svc: svc_create_socket(%s, %d, %u.%u.%u.%u:%d)\n",
-				serv->sv_program->pg_name, protocol,
-				NIPQUAD(sin->sin_addr.s_addr),
-				ntohs(sin->sin_port));
+	svc_print_addr(sin, addrbuf, sizeof(addrbuf));
+	dprintk("svc: svc_create_socket(%s, %d, %s)\n",
+		serv->sv_program->pg_name, protocol, addrbuf);
 
 	if (protocol != IPPROTO_UDP && protocol != IPPROTO_TCP) {
 		printk(KERN_WARNING "svc: only UDP and TCP "
@@ -1459,14 +1459,14 @@
 	}
 	type = (protocol == IPPROTO_UDP)? SOCK_DGRAM : SOCK_STREAM;
 
-	if ((error = sock_create_kern(PF_INET, type, protocol, &sock)) < 0)
+	if ((error = sock_create_kern(sin->sa_family, type, protocol,
+			&sock)) < 0)
 		return error;
 
 	if (sin != NULL) {
 		if (type == SOCK_STREAM)
 			sock->sk->sk_reuse = 1; /* allow address reuse */
-		error = sock->ops->bind(sock, (struct sockaddr *) sin,
-						sizeof(*sin));
+		error = sock->ops->bind(sock, sin, svc_get_addrlen(sin));
 		if (error < 0)
 			goto bummer;
 	}
@@ -1534,7 +1534,7 @@
 	sin.sin_family      = AF_INET;
 	sin.sin_addr.s_addr = INADDR_ANY;
 	sin.sin_port        = htons(port);
-	return svc_create_socket(serv, protocol, &sin);
+	return svc_create_socket(serv, protocol, (struct sockaddr *)&sin);
 }
 
 /*

