search for: c8f817e

Displaying 5 results from an estimated 5 matches for "c8f817e".

2019 Sep 16
1
[libnbd PATCH] states: Avoid magic number for h->tls
...UP, "handshake: server refused TLS, " - "but handle TLS setting is require (2)"); + "but handle TLS setting is 'require' (2)"); return 0; } diff --git a/generator/states-newstyle.c b/generator/states-newstyle.c index c8f817e..b4f2b80 100644 --- a/generator/states-newstyle.c +++ b/generator/states-newstyle.c @@ -129,10 +129,10 @@ handle_reply_error (struct nbd_handle *h) h->gflags = be16toh (h->gflags); if ((h->gflags & NBD_FLAG_FIXED_NEWSTYLE) == 0 && - h->tls == 2) { + h->tl...
2019 Sep 17
0
[PATCH libnbd 2/2] api: New API for reading NBD protocol.
...+108,7 @@ switch (reply) { case NBD_REP_ACK: - SET_NEXT_STATE (%.READY); + SET_NEXT_STATE (%^FINISHED); return 0; case NBD_REP_INFO: if (len > maxpayload /* see RECV_NEWSTYLE_OPT_GO_REPLY */) diff --git a/generator/states-newstyle.c b/generator/states-newstyle.c index c8f817e..7742ea3 100644 --- a/generator/states-newstyle.c +++ b/generator/states-newstyle.c @@ -155,4 +155,13 @@ handle_reply_error (struct nbd_handle *h) } return 0; + NEWSTYLE.FINISHED: + if ((h->gflags & NBD_FLAG_FIXED_NEWSTYLE) == 0) + h->protocol = "newstyle"; + else +...
2019 Sep 17
3
[PATCH libnbd 1/2] api: Add new API to read whether TLS was negotiated.
When LIBNBD_TLS_ALLOW is used we don't have a way to find out if TLS was really negotiated. This adds a flag and a way to read it back. Unfortunately there is no test yet, because LIBNBD_TLS_ALLOW is not tested -- it really should be but requires quite a complicated set of tests because ideally we'd like to find out whether it falls back correctly for all supported servers. --- TODO
2019 Jun 29
0
[libnbd PATCH 2/6] generator: Allow DEAD state actions to run
...7 @@ default: if (handle_reply_error (h) == -1) { SET_NEXT_STATE (%.DEAD); - return -1; + return 0; } debug (h, "structured replies are not supported by this server"); diff --git a/generator/states-newstyle.c b/generator/states-newstyle.c index 912ecb5..c8f817e 100644 --- a/generator/states-newstyle.c +++ b/generator/states-newstyle.c @@ -119,7 +119,7 @@ handle_reply_error (struct nbd_handle *h) NEWSTYLE.RECV_GFLAGS: switch (recv_into_rbuf (h)) { - case -1: SET_NEXT_STATE (%.DEAD); return -1; + case -1: SET_NEXT_STATE (%.DEAD); return 0; case 0...
2019 Jun 29
19
[libnbd PATCH 0/6] new APIs: aio_in_flight, aio_FOO_notify
I still need to wire in the use of *_notify functions into nbdkit to prove whether it makes the code any faster or easier to maintain, but at least the added example shows one good use case for the new API. Eric Blake (6): api: Add nbd_aio_in_flight generator: Allow DEAD state actions to run generator: Allow Int64 in callbacks states: Prepare for aio notify callback api: Add new