From patchwork Sun Jul 28 18:36:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 2834718 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EB594C0319 for ; Sun, 28 Jul 2013 18:36:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 25E5E2013C for ; Sun, 28 Jul 2013 18:36:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38D0320127 for ; Sun, 28 Jul 2013 18:36:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752782Ab3G1Sgl (ORCPT ); Sun, 28 Jul 2013 14:36:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35970 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751745Ab3G1Sgl (ORCPT ); Sun, 28 Jul 2013 14:36:41 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6SIafeg010002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 28 Jul 2013 14:36:41 -0400 Received: from smallhat.bos.devel.redhat.com (vpn-60-122.rdu2.redhat.com [10.10.60.122]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r6SIaeKf022771 for ; Sun, 28 Jul 2013 14:36:40 -0400 From: Steve Dickson To: Linux NFS Mailing list Subject: [PATCH 1/2] rpc.nfsd: No longer advertise NFS v2 support. Date: Sun, 28 Jul 2013 14:36:37 -0400 Message-Id: <1375036598-31090-1-git-send-email-steved@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Changed the default protocol versions that rpc.nfsd register with rpcbind to just 3 and 4. Version 2 can still be enabled with the '-V' flag, but it will not be on by default. Signed-off-by: Steve Dickson --- support/include/nfs/nfs.h | 1 + utils/nfsd/nfsd.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/support/include/nfs/nfs.h b/support/include/nfs/nfs.h index 174c2dd..5fd86f6 100644 --- a/support/include/nfs/nfs.h +++ b/support/include/nfs/nfs.h @@ -52,6 +52,7 @@ struct nfs_fh_old { #define NFSCTL_UDPISSET(_cltbits) ((_cltbits) & NFSCTL_UDPBIT) #define NFSCTL_TCPISSET(_cltbits) ((_cltbits) & NFSCTL_TCPBIT) +#define NFSCTL_VERDEFAULT (0xc) /* versions 3 and 4 */ #define NFSCTL_VERSET(_cltbits, _v) ((_cltbits) |= (1 << ((_v) - 1))) #define NFSCTL_UDPSET(_cltbits) ((_cltbits) |= NFSCTL_UDPBIT) #define NFSCTL_TCPSET(_cltbits) ((_cltbits) |= NFSCTL_TCPBIT) diff --git a/utils/nfsd/nfsd.c b/utils/nfsd/nfsd.c index e87c0a9..df48392 100644 --- a/utils/nfsd/nfsd.c +++ b/utils/nfsd/nfsd.c @@ -100,7 +100,7 @@ main(int argc, char **argv) char *haddr = NULL; int socket_up = 0; int minorvers41 = 0; /* nfsv4 minor version */ - unsigned int versbits = NFSCTL_ALLBITS; + unsigned int versbits = NFSCTL_VERDEFAULT; unsigned int protobits = NFSCTL_ALLBITS; unsigned int proto4 = 0; unsigned int proto6 = 0;