emacs-circe / circe

Circe, a Client for IRC in Emacs
GNU General Public License v3.0
390 stars 51 forks source link

Can't seem to disable ipv6 (with tls) #373

Open abliss opened 4 years ago

abliss commented 4 years ago

I have set circe-default-ip-family to ipv4, but circe still seems to use ipv6 when connecting (over tls) to e.g. irc.tilde.chat (the connection hangs forever, perhaps because I lack ipv6 connectivity; strace indicates emacs is making ipv6 networking calls).

I notice that https://github.com/jorgenschaefer/circe/blob/e4af7143bd32907d0bf922bee53a96399f0376fa/irc.el#L82 and https://github.com/jorgenschaefer/circe/blob/e4af7143bd32907d0bf922bee53a96399f0376fa/circe.el#L1237 seem to disagree about the plist key; circe.el passes it as :ip-family but irc.el seems to receive it as :family , but I also am not certain that make-tls-process actually supports :family.

wasamasa commented 4 years ago

I doubt make-tls-process supports :family. It shells out to either gnutls-cli (which doesn't have an IPv4/v6 switch) or openssl s_client (which has one, but it's not preferred). There is no code to conditionally add arguments either. Now, it shouldn't hang "forever", just for about a minute to time out and retry with IPv4.

wasamasa commented 3 years ago

This should work now as make-network-process is used with Emacs 26.1 or newer, see https://github.com/jorgenschaefer/circe/issues/377 for details.