From 199685bca9ef3e720c40c645dff2681455e40fa9 Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Fri, 22 May 2009 16:41:33 +0000 Subject: [PATCH] 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) --- sys/fs/nfsserver/nfs_nfsdstate.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdstate.c b/sys/fs/nfsserver/nfs_nfsdstate.c index 37ba36e3c5b5..70d722bc03e5 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); } /*