Cool. Thanks for helping me through the process and for the great
feedback.
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point Drive Ste 101 | Richland, Washington USA
Office: (650) 713-3060
On Thu, Sep 21, 2017 at 2:55 AM, Daniel P. Berrange
wrote:
On Wed, Sep 20
socket in various ways to help
exercise the different code paths. I would be happy to post it here to
help test the changes.
Thanks,
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point Drive Ste 101 | Richland, Washington USA
Office: (650) 713-3060
On Tue, Sep 12, 2017 at 8
Some browsers send pings/pongs with no payload, so allow empty payloads
instead of closing the connection.
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 62 +---
1 file changed, 30 insertions(+), 32 deletions(-)
diff --git a/io
126 bytes, ,
limiting the total message size to 132 bytes. This is enforced in
qio_channel_websock_decode_header(). If anything larger is sent in a
control message, including pings, the connection is immediately closed.
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point
While updating the websocket code, several other bugs were discovered
for which patches are also included early in the set.
Brandon Carpenter (7):
io: Always remove an old channel watch before adding a new one
io: Small updates in preparation for websocket changes
io: Add support for fragm
Make a best effort attempt to close websocket connections according to
the RFC. Sends the close message, as room permits in the socket buffer,
and immediately closes the socket.
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 65
Allows fragmented binary frames by saving the previous opcode. Handles
the case where an intermediary (i.e., web proxy) fragments frames
originally sent unfragmented by the client.
Signed-off-by: Brandon Carpenter
---
include/io/channel-websock.h | 1 +
io/channel-websock.c | 26
Add an immediate ping reply (pong) to the outgoing stream when a ping
is received. Unsolicited pongs are ignored.
Signed-off-by: Brandon Carpenter
---
include/io/channel-websock.h | 1 +
io/channel-websock.c | 64 +---
2 files changed, 44
Gets rid of unnecessary bit shifting and performs proper EOF checking to
avoid a large number of repeated calls to recvmsg() when a client
abruptly terminates a connection (bug fix).
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 62
Also set saved handle to zero when removing without adding a new watch.
Signed-off-by: Brandon Carpenter
Reviewed-by: Paolo Bonzini
Reviewed-by: Daniel P. Berrange
---
ui/vnc-auth-vencrypt.c | 3 +++
ui/vnc-ws.c| 6 ++
ui/vnc.c | 4
3 files changed, 13
Keep pings and gratuitous pongs generated by web browsers from killing
websocket connections.
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/io/channel-websock.c b/io/channel-websock.c
index
iant closing of websocket connections, which I must have
lost during a rebase. Should I submit v3 of the patch series or just
add those patches to this thread?
Thank you,
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point Drive Ste 101 | Richland, Washington USA
Office:
if (ioc->opcode &
QIO_CHANNEL_WEBSOCK_CONTROL_OPCODE_MASK) {
return QIO_CHANNEL_ERR_BLOCK;
}
payload_len = ioc->encinput.offset -
(ioc->encinput.offset % 4);
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point Driv
er(ioc,
+ QIO_CHANNEL_WEBSOCK_OPCODE_PONG, &ioc->encinput);
+ }
} /* pong frames are ignored */
if (payload_len) {
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point Drive Ste 101 | Richland, Washington USA
Office: (650) 713-3060
--
CONFIDENTIALITY NOTI
My apologies. I read that document before submitting the patch, but
there was a lot to take in. Would you like me to resend the patch
without the references?
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point Drive Ste 101 | Richland, Washington USA
Office: (650) 713
While updating the websocket code, several other bugs were discovered
for which patches are also included early in the set.
Brandon Carpenter (6):
io: Always remove an old channel watch before adding a new one
io: Small updates in preparation for websocket changes
io: Add support for fragm
Keep pings and gratuitous pongs generated by web browsers from killing
websocket connections.
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 21 +
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/io/channel-websock.c b/io/channel-websock.c
index
Gets rid of unnecessary bit shifting and performs proper EOF checking to
avoid a large number of repeated calls to recvmsg() when a client
abruptly terminates a connection (bug fix).
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 62
Add an immediate ping reply (pong) to the outgoing stream when a ping
is received. Unsolicited pongs are ignored.
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 50 --
1 file changed, 32 insertions(+), 18 deletions(-)
diff --git a/io
Allows fragmented binary frames by saving the previous opcode. Handles
the case where an intermediary (i.e., web proxy) fragments frames
originally sent unfragmented by the client.
Signed-off-by: Brandon Carpenter
---
include/io/channel-websock.h | 1 +
io/channel-websock.c | 26
Some browsers send pings/pongs with no payload, so allow empty payloads
instead of closing the connection.
Signed-off-by: Brandon Carpenter
---
io/channel-websock.c | 62 +---
1 file changed, 30 insertions(+), 32 deletions(-)
diff --git a/io
Also set saved handle to zero when removing without adding a new watch.
Signed-off-by: Brandon Carpenter
Reviewed-by: Paolo Bonzini
Reviewed-by: Daniel P. Berrange
---
ui/vnc-auth-vencrypt.c | 3 +++
ui/vnc-ws.c| 6 ++
ui/vnc.c | 4
3 files changed, 13
this patch in the cover letter?
Thanks.
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc.
400 Columbia Point Drive Ste 101 | Richland, Washington USA
Office: (650) 713-3060
On Tue, Jul 25, 2017 at 1:36 AM, Daniel P. Berrange
wrote:
On Mon, Jul 24, 2017 at 11:15:44AM -0700, Br
Sure thing. I implemented it in multiple commits, but there was enough
overlap in those commits that I thought it would require extra
unnecessary work to review. But I also found an issue that needs fixed,
so I need to resubmit anyway.
--
Brandon Carpenter | Software Engineer
Cypherpath, Inc
the RFC, including providing reason code and
message to aid debugging of unexpected disconnects. Empty payloads
should not cause a disconnect.
Signed-off-by: Brandon Carpenter
---
include/io/channel-websock.h | 1 +
io/channel-websock.c | 243
Also set saved handle to zero when removing without adding a new watch.
Signed-off-by: Brandon Carpenter
---
ui/vnc-auth-vencrypt.c | 3 +++
ui/vnc-ws.c| 6 ++
ui/vnc.c | 4
3 files changed, 13 insertions(+)
diff --git a/ui/vnc-auth-vencrypt.c b/ui/vnc-auth
26 matches
Mail list logo