From nobody Mon Oct 24 23:12:46 2022 X-Original-To: bugs@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 4Mx9pQ6djGz4fbPf for ; Mon, 24 Oct 2022 23:12:46 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Mx9pQ4NNzz3KnN for ; Mon, 24 Oct 2022 23:12:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Mx9pQ3Rr6zNtD for ; Mon, 24 Oct 2022 23:12:46 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 29ONCkiE012962 for ; Mon, 24 Oct 2022 23:12:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 29ONCkSi012960 for bugs@FreeBSD.org; Mon, 24 Oct 2022 23:12:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 267301] nfs uses udp for portmapper even when proto=tcp specified Date: Mon, 24 Oct 2022 23:12:46 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rmacklem@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666653166; 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: in-reply-to:in-reply-to:references:references; bh=FYgKy1s/DeIIkkIAF0XoHFuNEaeyDgKubB2VfmJWtYo=; b=BOq1YXRZI7OF/RIMxDz8hKbgllWDZ7Ff8fEPOiv5RMZ5/MRCIuGY2ji/IzXZsCzygXSTyc s0sGt8jaIyR/2oQ1OUTMklnXNS6d4UNgb7qyyD5VQuBUzatd0Y135XuDOdockxGVo27ZFY D0WbwV8ztC5w+uuGVjuNeh+BDR7l+jCMOQb0P4s2mFDZvtzyMJ+m4TKLc8CjBtvTbmz5Fe 1MAqc3SYaUyAF4+onLIwpkFxEahqoHePoYlPW0mZZwu3mM2Vzf2T4PgLlmzs83z4MzkSWA glW7b0X798jMGNl4PiKOw2ZJa5VZvhWnHxVhu+Mo6ncB8kPtWKhE2EpfmfGqYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666653166; a=rsa-sha256; cv=none; b=cUq1FMDetx5vveiJHVCHSroUE4PKUhlerQhBUYLYXDMb4bdbNAKGhiiZog+VPLoSD4VZd/ NqKuVnoeuFGqcmCIjFr8P1TGPgcJZFPob7mRN1xMOUANTmLn2e2NCxwbjS9G2+YIiUY9jj Ao/sc3yT/CmTqQhDi3ZXI+ycJsuPdjoJPuIGqJN2vZVxK12kkIaYa1vf8OjJ50sL5Mj/9x hb0FxMriKqIM06wxh9h1BjPoAyp8gOtrZyPjYKI/mRFkk37ZXp74yYLh4H9Z4KTHq9qDfb Rblg3DzGPyPpa+Hvw4Y4WKavyYwOPZJXOUJc4khX0sat3XXFYQUFDPyNyntpUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267301 --- Comment #1 from Rick Macklem --- Well, here's what the code in rpcb_getaddr(), found in lib/libc/rpc/rpcb_clnt.c looks like: /* * Try UDP only - there are some portmappers out * there that use UDP only. */ if (strcmp(nconf->nc_proto, NC_TCP) =3D=3D 0) { struct netconfig *newnconf; if ((newnconf =3D getnetconfigent("udp")) =3D=3D NU= LL) { rpc_createerr.cf_stat =3D RPC_UNKNOWNPROTO; return (NULL); } client =3D getclnthandle(host, newnconf, &parms.r_a= ddr); freenetconfigent(newnconf); } else { client =3D getclnthandle(host, nconf, &parms.r_addr= ); } Pretty obvious why it uses UDP. Now, this code is only compiled into rpcb_clnt.c when PORTMAP is defined. It is defined in lib/libc/rpc/Makefile.inc. (I suspect taking -DPORTMAP out of this Makefile.inc would make it use TCP, once you rebuild libc from the sources and link mount_nfs to that.) I may try this, but I do not have an easy way to do so, since my systems are old laptops with very little storage (ok for building a kernel, but not for "make buildworld", etc). Then the problem is that this change affects everyone. I do not see a way to only enable it based on a new mount option. So what happens if this breaks a mount for someone else? That would be a POLA violation, since the code has been like this for decades, I suspect? It would be best for you to patch this for youyr local systems, although I will ask on the freebsd-fs@ mailing list, to see what others think of making this change? --=20 You are receiving this mail because: You are the assignee for the bug.=