lkml.org 
[lkml]   [2004]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[Patch] nfsd: Insecure port warning shows decimal IPv4 address
From
Hi guys,

Made a quick patch that changes dmesg(8) output to show IPv4 addresses in
decimal form instead of hexadecimal when you receive an insecure port
warning.
---
nfsfh.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
--- linux-2.6.9-rc3/fs/nfsd/nfsfh.c 2004-09-30 05:04:26.000000000 +0200
+++ linux-2.6.9-rc3-xbox/fs/nfsd/nfsfh.c 2004-10-03 19:29:39.711659000 +0200
@@ -153,8 +153,11 @@
error = nfserr_perm;
if (!rqstp->rq_secure && EX_SECURE(exp)) {
printk(KERN_WARNING
- "nfsd: request from insecure port (%08x:%d)!\n",
- ntohl(rqstp->rq_addr.sin_addr.s_addr),
+ "nfsd: request from insecure port (%d.%d.%d.%d:%d)!\n",
+ (unsigned char)(ntohl(rqstp->rq_addr.sin_addr.s_addr) >> 24),
+ (unsigned char)(ntohl(rqstp->rq_addr.sin_addr.s_addr) >> 16),
+ (unsigned char)(ntohl(rqstp->rq_addr.sin_addr.s_addr) >> 8),
+ (unsigned char)(ntohl(rqstp->rq_addr.sin_addr.s_addr)),
ntohs(rqstp->rq_addr.sin_port));
goto out;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:06    [from the cache]
©2003-2011 Jasper Spaans