search for: libnbd_handshake_flag_no_zero

Displaying 8 results from an estimated 8 matches for "libnbd_handshake_flag_no_zero".

2019 Sep 16
1
[libnbd PATCH] api: Add set_handshake_flags for integration
...+ +The server gracefully handles unknown option requests from the +client, rather than disconnecting. Without this flag, a client +cannot safely request to use extensions such as TLS encryption or +structured replies, as the request may cause an older server to +drop the connection. + +=item C<LIBNBD_HANDSHAKE_FLAG_NO_ZEROES> = 2 + +If the client is forced to use C<NBD_OPT_EXPORT_NAME> instead of +the preferred C<NBD_OPT_GO>, this flag allows the server to send +fewer all-zero padding bytes over the connection. + +=back + +Future NBD extensions may add further flags. +"; + see_also = ["L&l...
2020 Sep 11
0
[libnbd PATCH v2 1/5] api: Add xxx_MASK constant for each Flags type
...true; h->request_sr = true; - h->uri_allow_transports = (uint32_t) -1; + h->uri_allow_transports = LIBNBD_ALLOW_TRANSPORT_MASK; h->uri_allow_tls = LIBNBD_TLS_ALLOW; h->uri_allow_local_file = false; - h->gflags = (LIBNBD_HANDSHAKE_FLAG_FIXED_NEWSTYLE | - LIBNBD_HANDSHAKE_FLAG_NO_ZEROES); + h->gflags = LIBNBD_HANDSHAKE_FLAG_MASK; s = getenv ("LIBNBD_DEBUG"); h->debug = s && strcmp (s, "1") == 0; diff --git a/python/t/110-defaults.py b/python/t/110-defaults.py index 47c1d02..fb961cf 100644 --- a/python/t/110-defaults.py +++ b/python/t/110...
2020 Sep 07
0
Re: [libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
...way > that we implement 64-bit requests...). Presumably, once the NBD > protocol defines it and future libnbd implements it, then future > libnbd will default to setting that bit during nbd_create(). An older > C client that did: > > flags = nbd_get_handshake_flags (nbd) & ~LIBNBD_HANDSHAKE_FLAG_NO_ZEROES; > nbd_set_handshake_flags (nbd, flags); > > will still run (even though flags contains a bit that was not known at > the time the C app was compiled, the libnbd call that checks that all > input bits are known is from the newer libnbd that recognizes > LIBNBD_HANDSHAKE_FLAG_6...
2020 Sep 07
4
[libnbd PATCH v2 0/3] Improve type-safety of ocaml/golang getters
Well, the golang changes (patch 1 and 2/3 of v1) were already committed, all that was left was the OCaml changes. I'm a lot happier with how things turned out with an UNKNOWN constructor in the OCaml variants. Eric Blake (3): tests: Enhance coverage of enum/flag range checking ocaml: Support unknown values for Enum/Flags ocaml: Typesafe returns for REnum/RFlags generator/OCaml.ml
2019 Oct 20
0
[PATCH libnbd] api: Allow NBD URIs to be restricted.
...ate (void) h->unique = 1; h->tls_verify_peer = true; h->request_sr = true; + + h->uri_allow_transports = (uint32_t) -1; + h->uri_allow_tls = LIBNBD_TLS_ALLOW; + h->uri_allow_local_file = false; + h->gflags = (LIBNBD_HANDSHAKE_FLAG_FIXED_NEWSTYLE | LIBNBD_HANDSHAKE_FLAG_NO_ZEROES); @@ -360,3 +365,24 @@ nbd_unlocked_get_protocol (struct nbd_handle *h) return h->protocol; } + +int +nbd_unlocked_set_uri_allow_transports (struct nbd_handle *h, uint32_t mask) +{ + h->uri_allow_transports = mask; + return 0; +} + +int +nbd_unlocked_set_uri_allow_tls (struct nbd_...
2019 Oct 20
2
[PATCH libnbd] api: Allow NBD URIs to be restricted.
Previous discussion: https://www.redhat.com/archives/libguestfs/2019-August/msg00102.html Last night I experimentally added support for URIs that contain the query parameter tls-psk-file, as part of rewriting the tests to cover more of the URI code. So you can now have a URI like: nbds://alice@localhost/?tls-psk-file=keys.psk However there's an obvious security problem here because now
2020 Sep 11
10
[libnbd PATCH v2 0/5] Add knobs for client- vs. server-side validation
In v2: - now based on my proposal to add LIBNBD_SHUTDOWN_IMMEDIATE - four flags instead of two: STRICT_FLAGS is new (patch 4), and STRICT_BOUNDS is separate from STRICT_ZERO_SIZE (patch 5) - various refactorings for more shared code and less duplication Eric Blake (5): api: Add xxx_MASK constant for each Flags type generator: Refactor filtering of accepted OFlags api: Add
2020 Sep 06
8
[libnbd PATCH 0/3] Improve type-safety of ocaml/golang getters
...that one might actually be a way that we implement 64-bit requests...). Presumably, once the NBD protocol defines it and future libnbd implements it, then future libnbd will default to setting that bit during nbd_create(). An older C client that did: flags = nbd_get_handshake_flags (nbd) & ~LIBNBD_HANDSHAKE_FLAG_NO_ZEROES; nbd_set_handshake_flags (nbd, flags); will still run (even though flags contains a bit that was not known at the time the C app was compiled, the libnbd call that checks that all input bits are known is from the newer libnbd that recognizes LIBNBD_HANDSHAKE_FLAG_64BIT as valid). But an OCaml...