From owner-freebsd-net@freebsd.org Fri Sep 27 21:30:52 2019 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2FA9012DF89 for ; Fri, 27 Sep 2019 21:30:52 +0000 (UTC) (envelope-from luthramihir708@gmail.com) Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46g4j72fZwz4PgD; Fri, 27 Sep 2019 21:30:51 +0000 (UTC) (envelope-from luthramihir708@gmail.com) Received: by mail-vs1-xe2e.google.com with SMTP id d3so2871316vsr.1; Fri, 27 Sep 2019 14:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=uTqGp1wznnovZb1KDxMj5PKjQZCtFv4m5nJyo7hcxUI=; b=FjH97Wnqbbd4/w4DBxwW21LHf7udlfZV6s+XkmP/nUpYdhT4Hk6IONwnk7Zrl51OeX ZgN+ftUitRfdovJWEbB7wf8KqnnZoOj8EUY5an4FsvifHdAU1b/9HuzMdHohiGXwIrkE P9DDH+YZNpqxw8p827/c2gbNsbDCHF5BQY9xhBWCy5nZtCcbDzbJxI64b95CajUmOGA3 5jYvt9SrbahDt7adDz773s6oWWGBt6qkOKmHj4985cTv+tgMF5slx5TaUTAaAUjufPsv uHIbsl8c5auK8IqU/FjMeieHgh6oIuzvuPr9/Ywu1oNPHpk/ylqOmfIEKx48ZXi8Pven 4TXA== 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=uTqGp1wznnovZb1KDxMj5PKjQZCtFv4m5nJyo7hcxUI=; b=focwQ90GQtM77Qxnf2SLoIlif2nnXKmpUgcCjYJw+Qy/qeg16bW/pX6y/4iYgACEZk Xd084jVqiHj9efNBB+NGY+8aETUJNJpbVqH9R5vxuBSc+6LDOu2q9nIKDCoexWr04PT6 m+A4l9ZhDtfFZrtjXe5y9tPgo6HJReA/6zX0VTB1TnmED+NryDXXOaMSXvXibylnoaIO AhpS7KGAUtvlhBQT2Gz0/Qq6ZWTXuKtiMoIjrmilw6p5hUj/Jt/e+5fH3mcJhDtYNluz WS4vJoBtah1NY0F8ypqJoYLoFurKHYCIojg94CMiY1LEpgf8uiZGQ0VpXJXbKxPdjlgx j6lw== X-Gm-Message-State: APjAAAXLUuIIOTlQZeKE++SUAywKBijHrw7w3IBD5uv6CnL5GnhCoRUL Oizh+kxPsX9rXLH3ub2x47N9v5YFjS6SYZMAlFY= X-Google-Smtp-Source: APXvYqzfx15zd0s3KjhziKI4NDxIVCvBur4rJCTLJxXklo8fZy244WRdD3nHVdczlUxAhRF7GTp1n1HWn5TNHOG96uw= X-Received: by 2002:a67:646:: with SMTP id 67mr3919127vsg.151.1569619849908; Fri, 27 Sep 2019 14:30:49 -0700 (PDT) MIME-Version: 1.0 References: <20190926.054603.242590258844901628.hrs@allbsd.org> <20190927.023152.1179355129866318906.hrs@allbsd.org> In-Reply-To: <20190927.023152.1179355129866318906.hrs@allbsd.org> From: Mihir Luthra Date: Sat, 28 Sep 2019 03:00:38 +0530 Message-ID: Subject: Re: rpc.statd already ipv6 clean? To: Hiroki Sato Cc: freebsd-net , hrs@freebsd.org X-Rspamd-Queue-Id: 46g4j72fZwz4PgD X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=FjH97Wnq; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of luthramihir708@gmail.com designates 2607:f8b0:4864:20::e2e as permitted sender) smtp.mailfrom=luthramihir708@gmail.com X-Spamd-Result: default: False [-2.00 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; IP_SCORE(0.00)[ip: (-9.58), ipnet: 2607:f8b0::/32(-2.59), asn: 15169(-2.17), country: US(-0.05)]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_DN_SOME(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[e.2.e.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Sep 2019 21:30:52 -0000 > > > clnt_create() checks /etc/netconfig and tries all of the transport > protocols with the specified class which are listed there, and then > chooses the first usable one. So if IPv6 is available, "udp6" will > be used because it is before "udp". > > statd.c handles the bind addresses on the server (service) side while > file.c and procs.c handle the client calls. They are different. > Thank you. I read more about it and I can relate it more now. Although, I was thinking if the transport is being selected at runtime through netconfig, aren't they already transport independent? > > lu> Also, while looking at the code, I think it always assumes ipv4 is > always > lu> present. Like `127.0.0.1` is added to host list always. On ipv6 only > lu> machine this may fail. > > Yes. We should fix this kind of hardcoded loopback addresses and > make userland utilities transport-independent wherever possible. It > can be replaced with getaddrinfo() with AF_UNSPEC for all available > address families. > > Yes I did fix that hardcoded thing and some code in rwhod too which I pushed to phabricator. Kind Regards, Mihir