From owner-freebsd-current@freebsd.org Mon Feb 11 00:56:22 2019 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1FFF214E3886 for ; Mon, 11 Feb 2019 00:56:22 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B80474E88 for ; Mon, 11 Feb 2019 00:56:20 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lf1-f45.google.com with SMTP id q11so6432356lfd.3 for ; Sun, 10 Feb 2019 16:56:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=DkB3UKxB72YWouoOmCBXb/EWbpPCem9N0u9LtRa7en0=; b=rND/HW+lvZhdDMrUZtv/AyPRZ2hdH7GfljSRnNo2bzrdfLNJXITVc737h98bN/humx nmQRbTqPLqQD0BxBTs4LgFtHH3FDH19LdX+ZAyKuf2fLO3AvEc9o+s7Tz1fBK4/kYJE6 daIXP1MwhIlaxjPa54wfZRLDyE2/xDEQ/eg1MEQIOvUNSejLNoE4+TJxA8FvpzhcYHK0 7sFfiy1H1xA0quRuyVxe7UozDmXJs/mHQaEeYdhuglYTnpfyw+UdsbWMMEBlnUwQoJwu QNq4zBxpT4lxbMTv3ng4e3JUajYfM0YnUzqWvLNjcSQhLZfByAxAbzJ/+iR9PmxLSPvz /71g== X-Gm-Message-State: AHQUAuYIbzkqaET+kiAnMvlaO/Q0u1g5T3mclCvirrVFoNe8IMg5qO54 0KdxgJ+kXiaOCJbpCYjBmokGH8g7EBoR+w4oH+JhCA== X-Google-Smtp-Source: AHgI3IYilVn2HrdsD9bAB9xRGROe6P5uHEVxNvmGo7jaC6shhUMPoB6z/9j3u8sq2J+ukMxC5cOU8JiBVjvVNN073+Y= X-Received: by 2002:a19:f707:: with SMTP id z7mr7350608lfe.54.1549846578854; Sun, 10 Feb 2019 16:56:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Sun, 10 Feb 2019 17:56:07 -0700 Message-ID: Subject: Re: what do jails map 127.0.0.1 to? To: Rick Macklem Cc: "freebsd-current@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 9B80474E88 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.167.45 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.70 / 15.00]; ARC_NA(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; IP_SCORE(-1.27)[ip: (-0.54), ipnet: 209.85.128.0/17(-3.77), asn: 15169(-1.95), country: US(-0.07)]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_SOME(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[45.167.85.209.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.43)[-0.431,0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; SUBJECT_ENDS_QUESTION(1.00)[]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2019 00:56:22 -0000 On Sun, Feb 10, 2019 at 5:51 PM Rick Macklem wrote: > > I am finally back to looking at an old PR#205193. > > The problem is that the nfsuserd daemon expects upcalls from the kernel > that are from localhost (127.0.0.1) and when jails are running on the system, > 127.0.0.1 is mapped to some other IP#. (I think it might be the address of the > first net interface on the machine, but I'm not sure?) > > Is there a way that nfsuserd.c can find out what this IP# is? > (I have a patch that converts nfsuserd.c to using an AF_LOCAL socket, but that > breaks for some setups. I think it was when the directory the socket was being > created in is NFSv4 mounted, but I can't remember exactly how it fails.) > > Thanks for any help with this, rick The easy way would be for nfsuserd to bind a socket to 127.0.0.1, then use getsockname(2) to see what actual address it got bound to. -Alan