mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Lammerts <eric@lammerts.org>
To: trond.myklebust@fys.uio.no
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] nfsroot port= parameter fix
Date: Mon, 3 Feb 2003 11:03:24 +0100	[thread overview]
Message-ID: <20030203100324.GA11011@ally.lammerts.org> (raw)


Hi,
When I specify the NFS port for nfsroot (e.g., nfsroot=<dir>,port=2049), the
kernel uses the wrong port. In my case it tries to use 264 (0x108) instead
of 2049 (0x801).

This patch adds the missing htons().

Eric

--- linux-2.4.21-pre4/fs/nfs/nfsroot.c.orig	Mon Feb  3 10:11:10 2003
+++ linux-2.4.21-pre4/fs/nfs/nfsroot.c	Mon Feb  3 10:28:35 2003
@@ -384,10 +384,11 @@
 					"number from server, using default\n");
 			port = nfsd_port;
 		}
-		nfs_port = htons(port);
+		nfs_port = port;
 		dprintk("Root-NFS: Portmapper on server returned %d "
 			"as nfsd port\n", port);
 	}
+	nfs_port = htons(nfs_port);
 
 	if ((port = root_nfs_getport(NFS_MNT_PROGRAM, mountd_ver, proto)) < 0) {
 		printk(KERN_ERR "Root-NFS: Unable to get mountd port "



                 reply	other threads:[~2003-02-03  9:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030203100324.GA11011@ally.lammerts.org \
    --to=eric@lammerts.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trond.myklebust@fys.uio.no \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®