From nobody Sun May 24 15:44:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNjx73W22z6g516 for ; Sun, 24 May 2026 15:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNjx72mxDz3JWS for ; Sun, 24 May 2026 15:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779637451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebEfz9MdtyJW3IJ54ekGQhjEI8LDuXS8VAXsXoj/Nkk=; b=D+YqzQlQKXRrKDRrupMpS+x194E84BgON+6GnPqILmYmZAHizE50Yo9U10EJGGFjAMmd6/ lV9nXJe0yxBmTNUMspW6qtyfnUCQXfE232CphsfUODm8leaBbd7vMYudZqFZgD8Q37V9lL zP1/RrxE2cc0C2z5i8oUlr//lbRCPtHmLWwRf39Msb89anvtKtTIMv5vZVBj/9yx9hB+iN TXqhlxK9qN59NMvKriWBv+K9aCxfNx0tlQ4Dq41fw5RTtlJFO9DS4rKv1BTsB+1+SgAkq9 8z+23wvCcnZQOdtB/HSKPSx2mdFrIwePufbCcMCVH5uyn63SoBXxKdqIMK/sZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779637451; a=rsa-sha256; cv=none; b=t9R8YbM13IOUEtdu3GqovWnMnnkh5k86Pnx/a75FwnKsi4gAiZohVJ3FHaRF8K5CPDWL5Z KZ/5K/8roScaeC/Bz/X67ospbjrNoaRFPOEhSzAWWjqFsykvFrLAvDvqgT4LAFQKPxS4Mo M8gWaDudk25WZV81dVbrGKsXF0Ilct8egLF1LOV6Z0rQsjbZoWM3J4Z67M5iTSVGw+Hunr vTZzvlfWhdBrfUJOCkB4AwSH0af/rzShUDDB0/o9lMPsosPk8f95wHjoW7w6UeZZSe5HFx FGphlT6+Z0px6wKBJq6/SbGRn3rNXUEEGlj3+rwSHplfHVwynFwr5wTt07MpPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779637451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebEfz9MdtyJW3IJ54ekGQhjEI8LDuXS8VAXsXoj/Nkk=; b=mngC5wVQUSz7yqS1m9Arawf6QEYkhyHm9XkaR4GLNlDd0pnRT0eqh3hJa+bt+v5WVot/fE 1pX6UIS7T/s8wZBh3PYGy5dqQJQHrjzO7BDK/ebW+YWH715uPSn0zfDhzPpVHQcyrZ92n9 sX4kvteu5pC2xFaPgaWp6VAlrSR/8Vw937gpXKP1iYFTZpKxiHUwJ+vb3MJwNqfrbtYhPM GQvlJ/s0hsBHMgb8u0OWkCnDS3NXrOn5DdjU9iD8ml0nEJh16fkH2yzUSdgmDP/uBmDcyz 36Fn3E63fz7x+Cl7aVl6TS1qJPDmwWUoRLz8IfNnbys+YmcbWqcGXlOn0WQdGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNjx72NJHz10jh for ; Sun, 24 May 2026 15:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 262a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 15:44:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Cracauer Subject: git: d2c21935e866 - main - pxeboot: warn and abort on TCP-only NFS server, which doesn't work for pxeboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cracauer X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2c21935e8666f5e9a38e27701445f5acc82465d Auto-Submitted: auto-generated Date: Sun, 24 May 2026 15:44:11 +0000 Message-Id: <6a131ccb.262a1.1bf2c54a@gitrepo.freebsd.org> The branch main has been updated by cracauer: URL: https://cgit.FreeBSD.org/src/commit/?id=d2c21935e8666f5e9a38e27701445f5acc82465d commit d2c21935e8666f5e9a38e27701445f5acc82465d Author: Martin Cracauer AuthorDate: 2026-05-24 15:43:00 +0000 Commit: Martin Cracauer CommitDate: 2026-05-24 15:43:00 +0000 pxeboot: warn and abort on TCP-only NFS server, which doesn't work for pxeboot When pxeboot gets a 0 as a port number from portmapper (indicating an error), it currently happily sends NFS packets to the server's port 0 in an endless loop. Change this to instead bail out with a useful message. This happens, for example, with recent Linux NFS servers as many distributions switched to TCP only NFS serving by default. FreeBSD's pxeboot must have UDP. In this situation pxeboot asks the server's portmapper for the UDP NFS port and since there is none gets 0. Also add a hint to the manpage explaining this and how to fix it. Reviewed by: ziaee, kevans, imp --- stand/i386/pxeldr/pxeboot.8 | 8 ++++++++ stand/libsa/rpc.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/stand/i386/pxeldr/pxeboot.8 b/stand/i386/pxeldr/pxeboot.8 index 496b244cf00f..aa6a5d5c5f7f 100644 --- a/stand/i386/pxeldr/pxeboot.8 +++ b/stand/i386/pxeldr/pxeboot.8 @@ -130,6 +130,14 @@ In all other respects, acts just like .Xr loader 8 . .Pp +.Nm +requires NFS over UDP. +Many recent distributions of Linux only serve NFS over TCP. +Enable UDP in some distributions by uncommenting +.Ql udp=y +in +.Pa /etc/nfs.conf . +.Pp For further information on Intel's PXE specifications and Wired for Management (WfM) systems, see .Li http://www.pix.net/software/pxeboot/archive/pxespec.pdf . diff --git a/stand/libsa/rpc.c b/stand/libsa/rpc.c index 6b11282a10be..bc5412f1efeb 100644 --- a/stand/libsa/rpc.c +++ b/stand/libsa/rpc.c @@ -415,6 +415,11 @@ rpc_getport(struct iodesc *d, n_long prog, n_long vers) return (-1); } port = (int)ntohl(res->port); + if (port == 0) { + printf("Portmapper returned 0. TCP-only NFS server?\n"); + free(pkt); + return (-1); + } free(pkt); rpc_pmap_putcache(d->destip, prog, vers, port);