Cover Letter Detail
Show a cover letter.
GET /api/covers/810212/?format=api
{ "id": 810212, "url": "http://patchwork.ozlabs.org/api/covers/810212/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/cover/20170905160530.19525-1-stlman@poczta.fm/", "project": { "id": 41, "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api", "name": "GNU C Library", "link_name": "glibc", "list_id": "libc-alpha.sourceware.org", "list_email": "libc-alpha@sourceware.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170905160530.19525-1-stlman@poczta.fm>", "list_archive_url": null, "date": "2017-09-05T16:05:26", "name": "[RFC,0/4,BZ,17083] Make getaddrinfo(3) return zone id from /etc/hosts for link-local IPv6 addresses", "submitter": { "id": 72297, "url": "http://patchwork.ozlabs.org/api/people/72297/?format=api", "name": "Łukasz Stelmach", "email": "stlman@poczta.fm" }, "mbox": "http://patchwork.ozlabs.org/project/glibc/cover/20170905160530.19525-1-stlman@poczta.fm/mbox/", "series": [ { "id": 1605, "url": "http://patchwork.ozlabs.org/api/series/1605/?format=api", "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=1605", "date": "2017-09-05T16:05:26", "name": "Make getaddrinfo(3) return zone id from /etc/hosts for link-local IPv6 addresses", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1605/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/covers/810212/comments/", "headers": { "Return-Path": "<libc-alpha-return-84190-incoming=patchwork.ozlabs.org@sourceware.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "mailing list libc-alpha@sourceware.org" ], "Authentication-Results": [ "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84190-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"G3YLe8ww\"; dkim-atps=neutral", "sourceware.org; auth=none" ], "Received": [ "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xms5k2WWyz9ryk\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 6 Sep 2017 02:06:18 +1000 (AEST)", "(qmail 116978 invoked by alias); 5 Sep 2017 16:06:11 -0000", "(qmail 116966 invoked by uid 89); 5 Sep 2017 16:06:10 -0000" ], "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:cc:subject:date:message-id\n\t:mime-version:content-type:content-transfer-encoding; q=dns; s=\n\tdefault; b=LATGUKVp2cacZIjAMtRGaHcLIjhaCjo4Oi4W75RJXALIza5bzhtI4\n\tU2BGwRwhR+QYqg7bQdvG68oH7pTx2m5Xmymc6Ut/kxI/Oo9NdSYkj0ekAz0Dmy7h\n\tAFtqoGyf5E/44mbW26AStRFMvHBgei4j9xFdBY0GQ8Xm9ZjQvaGDh8=", "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:from:to:cc:subject:date:message-id\n\t:mime-version:content-type:content-transfer-encoding; s=default;\n\tbh=rI4yhwzt54HQSWa/GJfldh6YdmU=; b=G3YLe8wwHrxXYfQeWmYvQS4elU3G\n\tW6FKZswHzXBRqJtxlQh3xAcmNAGBC8Wvq8BROLsPy6GYQdiTfsAuAgdR/spqLwPV\n\tTlQi48ziMvW6S8mAtoLODlhD0r9AyZY2f35YBLMnDpOpixI0qcSgsVb1hMmRnWIB\n\toGI4Z+4AzWrXhhI=", "Mailing-List": "contact libc-alpha-help@sourceware.org; run by ezmlm", "Precedence": "bulk", "List-Id": "<libc-alpha.sourceware.org>", "List-Unsubscribe": "<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>", "List-Subscribe": "<mailto:libc-alpha-subscribe@sourceware.org>", "List-Archive": "<http://sourceware.org/ml/libc-alpha/>", "List-Post": "<mailto:libc-alpha@sourceware.org>", "List-Help": "<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>", "Sender": "libc-alpha-owner@sourceware.org", "X-Virus-Found": "No", "X-Spam-SWARE-Status": "No, score=-6.9 required=5.0 tests=BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_2,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=nis, H*Ad:D*fm,\n\tH*Ad:D*poczta.fm, slight", "X-HELO": "smtpo.poczta.interia.pl", "X-Interia-R": "Interia", "X-Interia-R-IP": "89.64.33.181", "X-Interia-R-Helo": "<localhost>", "From": "=?utf-8?q?=C5=81ukasz_Stelmach?= <stlman@poczta.fm>", "To": "libc-alpha@sourceware.org", "Cc": "=?utf-8?q?=C5=81ukasz_Stelmach?= <stlman@poczta.fm>", "Subject": "[RFC][PATCH 0/4][BZ 17083] Make getaddrinfo(3) return zone id from\n\t/etc/hosts for link-local IPv6 addresses", "Date": "Tue, 5 Sep 2017 18:05:26 +0200", "Message-Id": "<20170905160530.19525-1-stlman@poczta.fm>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-Interia-Antivirus": "OK", "X-IPL-POID": "4", "X-IPL-SAS-SPAS": "-0.6", "X-IPL-SAS-UREP": "0", "X-IPL-SAS-UREP-PRIV": "0", "X-IPL-Envelope-To": "stlman@poczta.fm" }, "content": "Hello,\n\nThe aim of the following patches is to enable retrieving zone\n(interface) information stored in /etc/hosts along with link-local IPv6\naddresses. This requires changes in several places in resolver and NSS.\n\nFirst the parse_line() function needs to detect the scope delimiter,\nparse what follows and find the network interface index, that later is\ngoing to be assigned to sin6_scope_id field of a sockaddr_in6 structure.\nThe easiest way to do this is to use getaddrinfo(3) with AI_NUMERICHOST\nflag that prevents any DB queries.\n\nThere is a slight mismatch in naming of variables. The field in the\nsockaddr_in6 structure is sin6_scope_id while I've decided to use\nin6_zone_id which better corresponds with the terms used in IPv6 related\nRFCs. If you think the term \"scope\" should be used instead of \"zone\", I\nam fine with it.\n\nWhen parsed, the zone information needs to be delivered to\ngetaddrinfo(3). It calls NSS functions gethostbyname4_r,\ngethostbyname3_r and gethostbyname2_r. Only the first of them can return\nthe information because it uses ritcher gaih_addrtupple structure\ninstead of an old hostent. However, gethostname4_r is used only if\nai_family hint is set to PF_UNSPEC. Which makes the whole API work weird\na bit. With the following entries in /etc/hosts\n\n--8<---------------cut here---------------start------------->8---\n192.168.0.1 foo\nfe80::0203:04ff:fe05:0607%eth0 foo\n--8<---------------cut here---------------end--------------->8---\n\nquerying for AF_INET6 address of host foo won't return any results,\nwhich is counterintuitive if not plain wrong. The comment in\ngetaddrinfo.c suggests, that getaddrinfo4_r should not be used unless\nai_family is set to PF_UNSPEC, to avoid unnecessary DNS queries.\n\nThe only way to solve the problem of less capable gethostbyname[23]_r\nand too verbose gethosbyname4_r is to introduce gethostbynamet5_r which\naccepts all the arguments of gethostbyname4_r AND an address family\n(af). So I renamed gethostbyname4_r to gethostbyname5_r and defined\ngethostbyname4_r as a wrapper for gethostbyname5_r in all four glibc NSS\nmodlues (i.e. files, dns, nis and nisplus). gethostbyname5_r passes the\naf argument to respective underlying \"parsers\". Unfotunately I was\nunable to test NIS/NIS+ modules, so please do it for me.\n\nThe last bit is to make getaddrinfo(3) call gethostbyname5_r. In theory,\nwith the new function in place, all other code paths are\nunnecessary. However, as I understand, different non-glibc NSS modules\nprovide different sets of functions so I've left the code paths intact.\n\nŁukasz Stelmach (4):\n getaddrinfo: Add comments for #else and #endif directives\n NSS: Parse zone identifier of IPv6 addresses in /etc/hosts\n NSS: Introduce gethostbyname5_r function\n getaddrinfo: Use the new getaddrinfo5_r NSS function\n\n nis/Versions | 3 +-\n nis/nss_nis/nis-hosts.c | 13 ++++++--\n nis/nss_nisplus/nisplus-hosts.c | 13 ++++++--\n nss/Versions | 1 +\n nss/nss_files/files-hosts.c | 66 +++++++++++++++++++++++++++++++++++------\n resolv/Versions | 2 +-\n resolv/nss_dns/dns-host.c | 32 ++++++++++++++++++--\n sysdeps/posix/getaddrinfo.c | 54 ++++++++++++++++++++-------------\n 8 files changed, 146 insertions(+), 38 deletions(-)" }