From nobody Wed Jan 05 14:48:00 2022 X-Original-To: freebsd-net@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 EBFA6193CBFD for ; Wed, 5 Jan 2022 14:48:01 +0000 (UTC) (envelope-from daemon-user@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 4JTXQn0l1Wz3w0B; Wed, 5 Jan 2022 14:48:01 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: from reviews.nyi.freebsd.org (reviews.nyi.freebsd.org [IPv6:2610:1c1:1:606c::16:b]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id A9F7D62B7; Wed, 5 Jan 2022 14:48:00 +0000 (UTC) (envelope-from daemon-user@freebsd.org) Received: by reviews.nyi.freebsd.org (Postfix, from userid 1346) id A848F272EB; Wed, 5 Jan 2022 14:48:00 +0000 (UTC) Date: Wed, 5 Jan 2022 14:48:00 +0000 To: Phabricator From: "emaste (Ed Maste)" Cc: freebsd-net@freebsd.org Reply-to: "emaste (Ed Maste)" Subject: [Differential] D33717: route: remove write-only struct hostent from getaddr() Message-ID: <6c41f57f3bf35fd98f611f0d7d8b2cc0@localhost.localdomain> X-Priority: 3 X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: , X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: Precedence: bulk Thread-Topic: PHID-DREV-zjrsejzgv3kp46yx4cfw X-Phabricator-Mail-ID: 2997279 X-Phabricator-Send-Attempt: q37bpb7twzdrlmtz In-Reply-To: References: Thread-Index: NzUyMTdmNmJjYzJiOGE2YTRjNjNjY2EzYjljIGHVr6A= X-Phabricator-Stamps: actor(@emaste) application(Differential) author(@emaste) monogram(D33717) object-type(DREV) phid(PHID-DREV-zjrsejzgv3kp46yx4cfw) reviewer(@hrs) reviewer(@imp) reviewer(@melifaro) revision-status(needs-review) subscriber(@freebsd-net-list) via(web) List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@freebsd.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="b1_6c41f57f3bf35fd98f611f0d7d8b2cc0" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1641394081; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=1CMZbXJhenZXNia7VbCxq397wT1DCBhyffLeGXbklYU=; b=G/qyNnVH7YmCPA9eShnLglAnHyx5ZwKD2urHk4hjzqYc/8cnOw9TbOCf3roaUJLrtei/Ra DOONf5ZfMdbqwWSr2KGn+UM214w+Jb+668hDiFjYc8u/N9M8y8FgcVwcR0dkfpV+fSGHmV hOl0612/eaw5+DBo1pblVv36sKZDroy4yhHHDxU6oyZlkNu0o/Rc9r4VB0utbpfsiAnLCQ yF37RIndkyCcDbB0v8UnnEFlgoQV0hQfNdH4kAY6zkOuqxBJtRogDu+/l2muSuSnTYdXRP DBk0b3ncpcNe+Xmvfdlbx62O29EniherDILxayhggJklhbi+dBDtFQaG9uoLaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1641394081; a=rsa-sha256; cv=none; b=vbTIvXOa6mcytm8I41HtCsZNwVPMet/0CAo3BxYbOAqPzgxI0LQtbu4bDRkzaMjuRzpwqk nIK61giI8QxjxnjLbbeOeMqrD1MtPKAoNFwAi0CRhaM4TqMgCbEiB1inq6ZPs+xO8H48rh sNET+V9e+qfXipffnyh1VABTrQdY6zyfgo31+1cSrlzUD8K2KVTcB16R9jlCSxoKblZUCn XFCsFxmZZ8hrUxjqoj3kB0Dh6DqVsTyT3Yrwv0i0/Pl2W0+pffuuno2BhZFAND96TnrBW8 +J+k8opxtHbTSSfh/VUFDAXko+kWopV5itU0EAcQGe8fgdS7mf8NCgaYRkqYKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --b1_6c41f57f3bf35fd98f611f0d7d8b2cc0 Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: base64 ZW1hc3RlIHVwZGF0ZWQgdGhpcyByZXZpc2lvbiB0byBEaWZmIDEwMDk3My4KZW1hc3RlIGFkZGVk IGEgY29tbWVudC4KCgogIHJlbW92ZSBub3ctdW51c2VkIHZhcmlhYmxlCgpDSEFOR0VTIFNJTkNF IExBU1QgVVBEQVRFCiAgaHR0cHM6Ly9yZXZpZXdzLmZyZWVic2Qub3JnL0QzMzcxNz92cz0xMDA4 MTUmaWQ9MTAwOTczCgpDSEFOR0VTIFNJTkNFIExBU1QgQUNUSU9OCiAgaHR0cHM6Ly9yZXZpZXdz LmZyZWVic2Qub3JnL0QzMzcxNy9uZXcvCgpSRVZJU0lPTiBERVRBSUwKICBodHRwczovL3Jldmll d3MuZnJlZWJzZC5vcmcvRDMzNzE3CgpBRkZFQ1RFRCBGSUxFUwogIHNiaW4vcm91dGUvcm91dGUu YwoKRU1BSUwgUFJFRkVSRU5DRVMKICBodHRwczovL3Jldmlld3MuZnJlZWJzZC5vcmcvc2V0dGlu Z3MvcGFuZWwvZW1haWxwcmVmZXJlbmNlcy8KClRvOiBlbWFzdGUsIG1lbGlmYXJvLCBpbXAsIGhy cwpDYzogZnJlZWJzZC1uZXQtbGlzdAo= --b1_6c41f57f3bf35fd98f611f0d7d8b2cc0 Content-Type: text/x-patch; charset=utf-8; name="D33717.100973.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="D33717.100973.patch" ZGlmZiAtLWdpdCBhL3NiaW4vcm91dGUvcm91dGUuYyBiL3NiaW4vcm91dGUvcm91dGUuYwotLS0g YS9zYmluL3JvdXRlL3JvdXRlLmMKKysrIGIvc2Jpbi9yb3V0ZS9yb3V0ZS5jCkBAIC0xMTcsNyAr MTE3LDcgQEAKIHN0YXRpYyB2b2lkCXByaW50YihpbnQsIGNvbnN0IGNoYXIgKik7CiBzdGF0aWMg dm9pZAlmbHVzaHJvdXRlcyhpbnQgYXJnYywgY2hhciAqYXJndltdKTsKIHN0YXRpYyBpbnQJZmx1 c2hyb3V0ZXNfZmliKGludCk7Ci1zdGF0aWMgaW50CWdldGFkZHIoaW50LCBjaGFyICosIHN0cnVj dCBob3N0ZW50ICoqLCBpbnQpOworc3RhdGljIGludAlnZXRhZGRyKGludCwgY2hhciAqLCBpbnQp Owogc3RhdGljIGludAlrZXl3b3JkKGNvbnN0IGNoYXIgKik7CiAjaWZkZWYgSU5FVAogc3RhdGlj IHZvaWQJaW5ldF9tYWtlbWFzayhzdHJ1Y3Qgc29ja2FkZHJfaW4gKiwgdV9sb25nKTsKQEAgLTc5 MCw3ICs3OTAsNiBAQAogbmV3cm91dGUoaW50IGFyZ2MsIGNoYXIgKiphcmd2KQogewogCXN0cnVj dCBzaWdhY3Rpb24gc2E7Ci0Jc3RydWN0IGhvc3RlbnQgKmhwOwogCXN0cnVjdCBmaWJsICpmbDsK IAljaGFyICpjbWQ7CiAJY29uc3QgY2hhciAqZGVzdCwgKmdhdGV3YXksICplcnJtc2c7CkBAIC04 MDIsNyArODAxLDYgQEAKIAlnYXRld2F5ID0gTlVMTDsKIAlmbGFncyA9IFJURl9TVEFUSUM7CiAJ bnJmbGFncyA9IDA7Ci0JaHAgPSBOVUxMOwogCVRBSUxRX0lOSVQoJmZpYmxfaGVh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