From patchwork Thu Mar 3 20:04:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Dickson X-Patchwork-Id: 607171 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p23K4w7A029846 for ; Thu, 3 Mar 2011 20:04:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758632Ab1CCUE5 (ORCPT ); Thu, 3 Mar 2011 15:04:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32057 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758545Ab1CCUE5 (ORCPT ); Thu, 3 Mar 2011 15:04:57 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p23K4tAU023234 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 3 Mar 2011 15:04:55 -0500 Received: from badhat.bos.devel.redhat.com (badhat.boston.devel.redhat.com [10.16.60.49]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p23K4sNw025697; Thu, 3 Mar 2011 15:04:54 -0500 Message-ID: <4D6FF466.2070004@RedHat.com> Date: Thu, 03 Mar 2011 15:04:54 -0500 From: Steve Dickson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.7 MIME-Version: 1.0 To: Karel Zak CC: Chuck Lever , linux-nfs@vger.kernel.org Subject: [PATCH 3/2] mount: Allow 'port=0' to be a valid port value. References: <1299159822-25190-1-git-send-email-kzak@redhat.com> In-Reply-To: <1299159822-25190-1-git-send-email-kzak@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Mar 2011 20:04:59 +0000 (UTC) diff --git a/utils/mount/network.c b/utils/mount/network.c index 8049c1a..88ab222 100644 --- a/utils/mount/network.c +++ b/utils/mount/network.c @@ -1346,7 +1346,7 @@ nfs_nfs_port(struct mount_options *options, unsigned long *port) case PO_NOT_FOUND: break; case PO_FOUND: - if (tmp >= 1 && tmp <= 65535) { + if (tmp >= 0 && tmp <= 65535) { *port = tmp; return 1; }