summaryrefslogtreecommitdiff
path: root/src/resolve/resolved-dns-synthesize.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-21 07:51:07 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-07-21 08:00:23 -0400
commit0926f3489dbc93a2e91ec8607a0ceb5d4d8a53e3 (patch)
tree218a128617036b873d1a9f70416bca88825cefd9 /src/resolve/resolved-dns-synthesize.c
parent8ae12e733c5369a7e6360eaa5c942ea05fe44bde (diff)
downloadsystemd-0926f3489dbc93a2e91ec8607a0ceb5d4d8a53e3.tar.gz
resolved: make sure idn2 conversions are roundtrippable
While working on the gateway→_gateway conversion, I noticed that libidn2 strips the leading underscore in some names. https://gitlab.com/libidn/libidn2/issues/30 was resolved in https://gitlab.com/libidn/libidn2/commit/05d753ea69e2308cd02436d0511f4b844071dc79, which disabled "STD3 ASCII rules" by default, i.e. disabled stripping of underscores. So the situation is that with previously released libidn2 versions we would get incorrect behaviour, and once new libidn2 is released, we should be OK. Let's implement a simple test which checks that the name survives the roundtrip, and if it doesn't, skip IDN resolution. Under old libidn2 this will fail in more cases, and under new libidn2 in fewer, but should be the right thing to do also under new libidn2.
Diffstat (limited to 'src/resolve/resolved-dns-synthesize.c')
0 files changed, 0 insertions, 0 deletions