"Network is unreachable" error returned when IPv6 is disabled and network is reachable using IPv4
This is migrated from evolution#1099 (closed). The problem is basically that glib reports "network is unreachable" when the actual problem is not even close to the message.
Sorry, the smallest steps-to-reproduce I have involve using glib through Evolution. The investigation that found glib/gio to be the culprit you can see at this comment.
To reproduce you basically click through mail setup wizard till Sending email
screen, in which you set smtp.gmail.com
as server and port 587
, and click "Check for supported types" button. Alternatively, create an account with the "sending" address:port as noted above, and try sending yourself a email.
Steps to reproduce
- Open
evolution
- Click
Edit → Accounts → Add → Mail Account
-
Identity
screen: usefoo@example.com
as email address, uncheck "Look up mail server details…", click next -
Receiving Email
screen: use1.1.1.1
as IMAP server andfoo
for username, click next (skip server lookup) -
Sending Email
screen: typesmtp.gmail.com
as server, choose587
as port number, checkServer requires authentication
, then press the buttonCheck for Supported Types
Expected
You'll get an error "Error performing TLS handshake: An unexpected TLS packet was received."
or a similar one about TLS failure.
Actual
You'll get Could not connect to smtp.gmail.com: Network is unreachable
, which is completely wrong as everything, starting the network and ending with the port, is reachable.
Versions
- glib2 2.66.0