Skip to content

resolve: treat EHOSTUNREACH as disconnected - #9774

Merged
keszybz merged 2 commits into
systemd:masterfrom
yuwata:dns-over-tls-openssl
Aug 6, 2018
Merged

keszybz merged 2 commits into
systemd:masterfrom
yuwata:dns-over-tls-openssl

Conversation

@yuwata

@yuwata yuwata commented Aug 2, 2018

Copy link
Copy Markdown
Member

Fixes #9773.

@irtimmer I am not sure this is a right way to fix #9773. Could you review this?

@yuwata yuwata added the resolve label Aug 2, 2018
@poettering

Copy link
Copy Markdown
Member

So it appears the kernel returns EHOSTUNREACH to userspace on some ICMP error packets (which the host or a firewall inbetween has the freedom to generate). Which means your patch is good. But could you add a brief comment to the macro? i.e. "The kernel sends EHOSTUNREACH to userspace if some ICMP error cases" or so.

In fact, we should add ENOPROTOOPT, EHOSTDOWN, ENONET here too, with the same explanation. can you add those too?

(See the icmp_err_convert[] in net/ipv4/icmp.c in the kernel sources)

@poettering poettering added the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Aug 2, 2018
@yuwata
yuwata force-pushed the dns-over-tls-openssl branch from a78b7be to 9f16ecd Compare August 6, 2018 02:11
@yuwata yuwata removed the reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks label Aug 6, 2018
@yuwata
yuwata force-pushed the dns-over-tls-openssl branch from 9f16ecd to 507c9d2 Compare August 6, 2018 02:16
@yuwata

yuwata commented Aug 6, 2018

Copy link
Copy Markdown
Member Author

@poettering Thank you for the review. I've added a comment and suggested three errno in the list.

@yuwata yuwata changed the title reolve: treat EHOSTUNREACH as disconnected resolve: treat EHOSTUNREACH as disconnected Aug 6, 2018
@keszybz
keszybz merged commit 68c597e into systemd:master Aug 6, 2018
@yuwata
yuwata deleted the dns-over-tls-openssl branch August 6, 2018 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

DNS-over-TLS(openssl): cannot resolve hosts with EHOSTUNREACH

3 participants