aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfsfh.c7
-rw-r--r--fs/nfsd/nfsproc.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index c59d6fbb7a6b..a0b4282cb284 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -20,6 +20,7 @@
20#include <linux/mount.h> 20#include <linux/mount.h>
21#include <asm/pgtable.h> 21#include <asm/pgtable.h>
22 22
23#include <linux/sunrpc/clnt.h>
23#include <linux/sunrpc/svc.h> 24#include <linux/sunrpc/svc.h>
24#include <linux/nfsd/nfsd.h> 25#include <linux/nfsd/nfsd.h>
25 26
@@ -180,10 +181,10 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
180 /* Check if the request originated from a secure port. */ 181 /* Check if the request originated from a secure port. */
181 error = nfserr_perm; 182 error = nfserr_perm;
182 if (!rqstp->rq_secure && EX_SECURE(exp)) { 183 if (!rqstp->rq_secure && EX_SECURE(exp)) {
184 char buf[RPC_MAX_ADDRBUFLEN];
183 printk(KERN_WARNING 185 printk(KERN_WARNING
184 "nfsd: request from insecure port (%u.%u.%u.%u:%d)!\n", 186 "nfsd: request from insecure port %s!\n",
185 NIPQUAD(rqstp->rq_addr.sin_addr.s_addr), 187 svc_print_addr(rqstp, buf, sizeof(buf)));
186 ntohs(rqstp->rq_addr.sin_port));
187 goto out; 188 goto out;
188 } 189 }
189 190
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index ec983b777680..5cc2eec981b8 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -19,6 +19,7 @@
19#include <linux/unistd.h> 19#include <linux/unistd.h>
20#include <linux/slab.h> 20#include <linux/slab.h>
21 21
22#include <linux/sunrpc/clnt.h>
22#include <linux/sunrpc/svc.h> 23#include <linux/sunrpc/svc.h>
23#include <linux/nfsd/nfsd.h> 24#include <linux/nfsd/nfsd.h>
24#include <linux/nfsd/cache.h> 25#include <linux/nfsd/cache.h>
@@ -147,10 +148,10 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
147 */ 148 */
148 149
149 if (NFSSVC_MAXBLKSIZE_V2 < argp->count) { 150 if (NFSSVC_MAXBLKSIZE_V2 < argp->count) {
151 char buf[RPC_MAX_ADDRBUFLEN];
150 printk(KERN_NOTICE 152 printk(KERN_NOTICE
151 "oversized read request from %u.%u.%u.%u:%d (%d bytes)\n", 153 "oversized read request from %s (%d bytes)\n",
152 NIPQUAD(rqstp->rq_addr.sin_addr.s_addr), 154 svc_print_addr(rqstp, buf, sizeof(buf)),
153 ntohs(rqstp->rq_addr.sin_port),
154 argp->count); 155 argp->count);
155 argp->count = NFSSVC_MAXBLKSIZE_V2; 156 argp->count = NFSSVC_MAXBLKSIZE_V2;
156 } 157 }