[noPoll] Bug: nopoll_conn_send_pong

Francis Brosnan Blázquez francis en aspl.es
Mar Nov 10 20:05:49 CET 2015



> Hello,



Hello,


> I recently had issues with nopoll sending incorrect PONG replies and
> causing timeouts... Debugging with Fiddler showed most websocket
> implementations send pong with masking while nopoll doesn't and thus
> causing the connection to timeout.



Ok, this depends because pong may have body and, according to the
RFC, client to server must be masked (so those pongs are) and when sent
by the server, it must go without masking...


> This line:
> 
> nopoll_conn_send_frame(conn, nopoll_true, nopoll_false, NOPOLL_PONG_FRAME...
> 
> Should be passing true for the second parameter:
> 
> nopoll_conn_send_frame(conn, nopoll_true, nopoll_true, NOPOLL_PONG_FRAME...


...assuming this code is called by the client (but not as a
server...where it will fail)


> Is this actually a bug in nopoll or just some servers require PONG with masking?


Ok, it is a bug. I've been checking the issue and the code in fact,
should be updated
to the following:

/* nopoll_bool masked = conn->role == NOPOLL_ROLE_CLIENT */
 nopoll_conn_send_frame (conn, nopoll_true, conn->role ==
NOPOLL_ROLE_CLIENT, NOPOLL_PONG_FRAME, 0, NULL, 0);

...that way masked will be nopoll_true send executed by the client ...
and nopoll_false
when it is a server reply (which is the common case which also explains
how this bug
flew under the radar),

Apply patch in SVN 239 (https://github.com/asples/nopoll/trunk)
Thanks for reporting,
Best Regards,



> _______________________________________________
> noPoll mailing list
> noPoll en lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/nopoll


-- 
Francis Brosnan Blázquez - ASPL
91 134 14 22 - 91 134 14 45 - 91 116 07 57

http://aspl.es
http://asplhosting.com
http://twitter.com/aspl_es
http://twitter.com/asplhosting

AVISO LEGAL

Este mensaje se dirige exclusivamente a su destinatario. Los datos
incluidos en el presente correo son confidenciales y sometidos a secreto
profesional, se prohíbe divulgarlos, en virtud de las leyes vigentes. Si
usted no lo es y lo ha recibido por error o tiene conocimiento del mismo
por cualquier motivo, le rogamos que nos lo comunique por este medio y
proceda a destruirlo o borrarlo.

En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL). No obstante, usted puede ejercitar sus derechos de acceso,
rectificación, cancelación y oposición dispuestos en la mencionada Ley
Orgánica, notificándolo por escrito a:
ASPL - Protección Datos, C/Antonio Suárez 10 A-102, 28802, Alcalá de
Henares (Madrid).
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.aspl.es/pipermail/nopoll/attachments/20151110/7d0ae08e/attachment.html>


Más información sobre la lista de distribución noPoll