summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsserver
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2009-05-22 16:41:33 +0000
committerrmacklem <rmacklem@FreeBSD.org>2009-05-22 16:41:33 +0000
commit9bc0f6dfac2f06dc61215d3ea192097baf874876 (patch)
treef36062e841b7bfe7c3d2caf39e32b4d1a82baa63 /sys/fs/nfsserver
parentfb57d2691e61eb7ee2ab8df2ee9f41842c5f1a26 (diff)
downloadFreeBSD-src-9bc0f6dfac2f06dc61215d3ea192097baf874876.zip
FreeBSD-src-9bc0f6dfac2f06dc61215d3ea192097baf874876.tar.gz
Change the reboot panic that would have occurred if clientid
numbers wrapped around to a printf() warning of a possible DOS attack, in the experimental nfsv4 server. Approved by: kib (mentor)
Diffstat (limited to 'sys/fs/nfsserver')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdstate.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c
index 37ba36e..70d722b 100644
--- a/sys/fs/nfsserver/nfs_nfsdstate.c
+++ b/sys/fs/nfsserver/nfs_nfsdstate.c
@@ -3705,12 +3705,8 @@ nfsrv_nextclientindex(void)
if (client_index != 0)
return (client_index);
- /*
- * In practice we'll never get here, but the panic is here
- * just for fun. (client_index will not wrap around on any real server)
- */
- panic("nfsv4 server out of clientids");
- return (0); /* Just to shut the compiler up */
+ printf("out of clientids, possible DOS attack\n");
+ return (client_index);
}
/*
OpenPOWER on IntegriCloud