Displaying 3 results from an estimated 3 matches for "ccaca32".
2019 Sep 16
1
[libnbd PATCH] api: Add set_handshake_flags for integration
...yle-opt-export-name.c | 2 +-
generator/states-newstyle.c | 14 ++--
generator/states-oldstyle.c | 5 ++
lib/handle.c | 18 ++++++
7 files changed, 107 insertions(+), 10 deletions(-)
diff --git a/lib/internal.h b/lib/internal.h
index ccaca32..998ca3d 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -157,6 +157,7 @@ struct nbd_handle {
} __attribute__((packed)) error;
} payload;
} __attribute__((packed)) sr;
+ uint16_t gflags;
uint32_t cflags;
uint32_t len;
uint16_t nrinfos;
diff --git a/lib/nb...
2019 Sep 12
2
[PATCH libnbd 1/2] nbd_connect_tcp: Try to return errno from underlying connect(2) call.
...all. */
if (status == 0)
SET_NEXT_STATE (%^MAGIC.START);
- else
+ else {
+ if (h->connect_errno == 0)
+ h->connect_errno = status;
SET_NEXT_STATE (%NEXT_ADDRESS);
+ }
return 0;
CONNECT_TCP.NEXT_ADDRESS:
diff --git a/lib/internal.h b/lib/internal.h
index a48edff..ccaca32 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -188,6 +188,7 @@ struct nbd_handle {
char *hostname, *port;
struct addrinfo hints;
struct addrinfo *result, *rp;
+ int connect_errno;
/* When sending metadata contexts, this is used. */
size_t querynum;
--
2.23.0
2019 Sep 17
3
[PATCH libnbd 1/2] api: Add new API to read whether TLS was negotiated.
...nlocked_get_tls (struct nbd_handle *h)
return h->tls;
}
+int
+nbd_unlocked_get_tls_negotiated (struct nbd_handle *h)
+{
+ return h->tls_negotiated;
+}
+
int
nbd_unlocked_set_tls_certificates (struct nbd_handle *h, const char *dir)
{
diff --git a/lib/internal.h b/lib/internal.h
index ccaca32..eb76ac1 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -87,6 +87,9 @@ struct nbd_handle {
uint64_t exportsize;
uint16_t eflags;
+ /* Flag set by the state machine to tell whether TLS was negotiated. */
+ bool tls_negotiated;
+
int64_t unique; /* Used for generating...