[PATCH] knfsd: SUNRPC: Add a function to format the address in an svc_rqst for printing
[linux-2.6.git] / fs / nfs / callback.c
index a070109..8c790af 100644 (file)
@@ -71,6 +71,8 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
        complete(&nfs_callback_info.started);
 
        for(;;) {
+               char buf[RPC_MAX_ADDRBUFLEN];
+
                if (signalled()) {
                        if (nfs_callback_info.users == 0)
                                break;
@@ -88,8 +90,8 @@ static void nfs_callback_svc(struct svc_rqst *rqstp)
                                        __FUNCTION__, -err);
                        break;
                }
-               dprintk("%s: request from %u.%u.%u.%u\n", __FUNCTION__,
-                               NIPQUAD(rqstp->rq_addr.sin_addr.s_addr));
+               dprintk("%s: request from %s\n", __FUNCTION__,
+                               svc_print_addr(rqstp, buf, sizeof(buf)));
                svc_process(rqstp);
        }
 
@@ -166,13 +168,17 @@ static int nfs_callback_authenticate(struct svc_rqst *rqstp)
 {
        struct sockaddr_in *addr = &rqstp->rq_addr;
        struct nfs_client *clp;
+       char buf[RPC_MAX_ADDRBUFLEN];
 
        /* Don't talk to strangers */
        clp = nfs_find_client(addr, 4);
        if (clp == NULL)
                return SVC_DROP;
-       dprintk("%s: %u.%u.%u.%u NFSv4 callback!\n", __FUNCTION__, NIPQUAD(addr->sin_addr));
+
+       dprintk("%s: %s NFSv4 callback!\n", __FUNCTION__,
+                       svc_print_addr(rqstp, buf, sizeof(buf)));
        nfs_put_client(clp);
+
        switch (rqstp->rq_authop->flavour) {
                case RPC_AUTH_NULL:
                        if (rqstp->rq_proc != CB_NULL)