[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnutls-dev] Bug#386530: sits waiting for server reponse in socket_b

From: Simon Josefsson
Subject: Re: [gnutls-dev] Bug#386530: sits waiting for server reponse in socket_bye
Date: Sun, 27 May 2007 16:10:28 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.0.95 (gnu/linux)

Andreas Metzler <address@hidden> writes:

> Hello,
> this is submitted by "Robert Millan
> [ackstorm]" <address@hidden>:
> On 2006-09-08 "Robert Millan [ackstorm]" <address@hidden> wrote:
>> Package: gnutls-bin
>> Severity: normal
>> Tags: patch upstream
>> Some servers (e.g. IIS) don't send a reply to gnutls_bye's close request.  
>> This
>> causes socket_bye to sit waiting for input from peer that never comes.
>> Since socket_bye is going to close the connection, we don't need to wait for
>> it anyway.  My attached patch replaces GNUTLS_SHUT_RDWR with GNUTLS_SHUT_WR,
>> which seems to archieve that.
>> Note: this patch has already been sent to upstream (address@hidden)
> I have stumbled upon this when browsing through gnutls' Debian's bug
> and it still seems to be open in 1.7.x. Due to address@hidden
> being non-public I do not know whether this has already been
> discussed.

I recall discussing this, but I can't find it in my bug-gnutls folder.
That is all the more reason to make that alias publicly archived--I've
done so now, address@hidden should go to address@hidden,
although I have yet to test it.

However, I'm not convinced this is the right fix.  I believe the servers
are buggy here, and changing gnutls seems the wrong response.

What we may want to do is to improve the behaviour when we encounter a
buggy server, which may include some kind of timeout or similar.
However, if the server closed the connection, I think it should be
possible to detect this, and then we can print a message.

To work on this, I need a way to reproduce it though.  Do you know of a
server that exhibit this behaviour that we can use?


> cu andreas
> diff -ur gnutls13-1.4.2.old/src/cli.c gnutls13-1.4.2/src/cli.c
> --- gnutls13-1.4.2.old/src/cli.c      2006-07-10 23:09:45.000000000 +0200
> +++ gnutls13-1.4.2/src/cli.c  2006-09-08 11:02:52.000000000 +0200
> @@ -1084,7 +1084,7 @@
>      if (socket->secure)
>      {
>          do
> -            ret = gnutls_bye (socket->session, GNUTLS_SHUT_RDWR);
> +            ret = gnutls_bye (socket->session, GNUTLS_SHUT_WR);
>          while (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN);
>          if (ret < 0)
>              fprintf (stderr, "*** gnutls_bye() error: %s\n",
> _______________________________________________
> Gnutls-dev mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]