search for: port_str

Displaying 20 results from an estimated 36 matches for "port_str".

2014 Aug 11
2
[PATCH] p2v: check results of strndup and sscanf
...git a/p2v/ssh.c b/p2v/ssh.c index 1e9b05c..ff906df 100644 --- a/p2v/ssh.c +++ b/p2v/ssh.c @@ -505,7 +505,16 @@ open_data_connection (struct config *config, int *local_port, int *remote_port) }, ovector, ovecsize)) { case 100: /* Ephemeral port. */ port_str = strndup (&h->buffer[ovector[2]], ovector[3]-ovector[2]); - sscanf (port_str, "%d", remote_port); + if (port_str == NULL) { + set_ssh_error ("not enough memory for strndup"); + mexp_close (h); + return NULL; + } + if (sscanf (port_str, "%d...
2017 Feb 04
4
[PATCH 0/4] p2v: Send ping packets, document timeout problems.
Fix and/or document issues raised in this thread: https://www.redhat.com/archives/libguestfs/2017-February/msg00010.html Rich.
2017 Feb 03
5
[PATCH 0/5] Support socket activation in virt-p2v.
As the subject says, support socket activation in virt-p2v. I have added upstream support for socket activation to nbdkit already: https://github.com/libguestfs/nbdkit/commit/7ff39d028c6359f5c0925ed2cf4a2c4c751af2e4 I posted a patch for qemu-nbd, still waiting on more reviews for that one: https://www.mail-archive.com/qemu-devel@nongnu.org/msg427246.html I tested this against old and new qemu
2019 Sep 12
2
[PATCH libnbd 1/2] nbd_connect_tcp: Try to return errno from underlying connect(2) call.
When we make a TCP connection we have to make multiple underlying connect(2) calls, once for each address returned by getaddrinfo. Unfortunately this meant that we lost the errno from any of these calls: $ nbdsh -c 'h.connect_tcp ("localhost", "nbd")' nbd.Error: nbd_connect_tcp: connect: localhost:nbd: could not connect to remote host This commit saves the errno from
2015 Dec 01
2
[PATCH 1/2] launch: direct: manually compose iscsi:// URIs
...return make_uri (g, "iscsi", NULL, NULL, - &src->servers[0], src->u.exportname); + case drive_protocol_iscsi: { + CLEANUP_FREE char *escaped_hostname = NULL; + CLEANUP_FREE char *escaped_target = NULL; + CLEANUP_FREE char *userauth = NULL; + char port_str[16]; + char *ret; + + escaped_hostname = + (char *) xmlURIEscapeStr(BAD_CAST src->servers[0].u.hostname, + BAD_CAST ""); + /* The target string must keep slash as it is, as exportname contains + * "iqn/lun". + */ + escape...
2019 Sep 12
0
[PATCH libnbd 2/2] interop: Retry TCP connections to qemu-nbd.
...4 --- a/interop/interop.c +++ b/interop/interop.c @@ -28,6 +28,7 @@ #include <fcntl.h> #include <time.h> #include <signal.h> +#include <errno.h> #include <sys/types.h> #include <libnbd.h> @@ -44,6 +45,7 @@ main (int argc, char *argv[]) int port; char port_str[16]; pid_t pid = -1; + int retry; #endif int64_t actual_size; char buf[512]; @@ -114,14 +116,19 @@ main (int argc, char *argv[]) } /* Unfortunately there's no good way to wait for qemu-nbd to start - * serving, so ... + * serving, so we need to retry here. */ - sleep...
2012 Oct 02
1
patch proposal for ssh-copy-id script
Hello everybody, I write an update version of ssh-copy-id script in order to support sshd non running on standard port 22. So I added another parameter to the script to allow user to specify the daemon port. I've also changed the way the command line parameter are retrieved in order to have a more "robust" way of getting them using getopts. Due to this change host name must be
2017 Jan 26
3
[PATCH 0/3] p2v: Allow nbdkit as an alternative NBD server.
qemu-nbd is a fine NBD server. However it's not easy to compile a reliably working version on RHEL 5. This patch series allows nbdkit to be used as an alternative (qemu-nbd is still the default). Rich.
2018 Jun 29
3
p2v: Various cleanups.
These are a prelude to fixing https://bugzilla.redhat.com/show_bug.cgi?id=1590220 A lot of the virt-p2v configuration code was duplicated manually. These changes make sure that most of it is generated. Rich.
2019 Sep 17
0
[PATCH libnbd 4/5] interop: Add -DTLS_MODE to the test.
...,7 @@ interop_qemu_nbd_tls_certs_CPPFLAGS = \ -DSERVER_PARAMS='"--object", "tls-creds-x509,id=tls0,endpoint=server,dir=$(abs_top_builddir)/tests/pki", "--tls-creds", "tls0", "-f", "raw", "-x", "/", "-p", port_str, tmpfile' \ -DEXPORT_NAME='"/"' \ -DCERTS=1 \ + -DTLS_MODE=LIBNBD_TLS_REQUIRE \ $(NULL) interop_qemu_nbd_tls_certs_CFLAGS = $(WARNINGS_CFLAGS) interop_qemu_nbd_tls_certs_LDADD = $(top_builddir)/lib/libnbd.la @@ -113,6 +114,7 @@ interop_qemu_nbd_tls_psk_CPPFLAGS = \ -...
2019 Oct 01
3
[PATCH libnbd 0/2] Change qemu-nbd interop tests to use socket activation.
Now that we have implemented systemd socket activation, we can use this to run qemu-nbd in tests. The first patch leaves some dead code around (the -DSERVE_OVER_TCP=1 path). It's possible we might want to use this to test against a putative future NBD server that only supports TCP, but on the other hand maybe we should just remove it. Tests & valgrind still pass for me. Rich.
2016 May 18
2
[PATCH v2 0/2] lib: qemu: Memoize qemu feature detection.
v1 -> v2: - Rebase on top of Pino's version work. Two patches went upstream, these are the two remaining patches. Note the generation number is still inside the qemu.stat file. We could put it in the filename, I have no particular preference. Rich.
2019 Jun 27
1
[libnbd PATCH] maint: Use $(NULL) for all Makefile.am macro lists
...- interop-qemu-nbd-tls-psk + interop-qemu-nbd-tls-psk \ + $(NULL) endif endif endif @@ -77,7 +82,8 @@ interop_qemu_nbd_CPPFLAGS = \ -DSERVE_OVER_TCP=1 \ -DSERVER=\"$(QEMU_NBD)\" \ -DSERVER_PARAMS='"-f", "raw", "-x", "/", "-p", port_str, tmpfile' \ - -DEXPORT_NAME='"/"' + -DEXPORT_NAME='"/"' \ + $(NULL) interop_qemu_nbd_CFLAGS = $(WARNINGS_CFLAGS) interop_qemu_nbd_LDADD = $(top_builddir)/lib/libnbd.la @@ -89,7 +95,8 @@ interop_qemu_nbd_tls_certs_CPPFLAGS = \ -DSERVER=\"$(QEMU_NBD)\...
2016 Jun 30
4
[PATCH 0/4] p2v: Send ^C to remote end to cancel the conversion.
(I don't have a BZ# for this yet, but I'm expecting it to be filed as an RFE) Currently if the user is in the virt-p2v GUI and cancels the conversion, all that happens is we abruptly close the ssh session to virt-v2v. That is bad .. possibly (or maybe not). But in any case there is an alternative: we can send a ^C key to the virt-v2v process, which it could catch and handle gracefully,
2016 May 12
7
[PATCH 0/4] lib: qemu: Memoize qemu feature detection.
Doing qemu feature detection in the direct backend takes ~100ms because we need to run `qemu -help' and `qemu -devices ?', and each of those interacts with glibc's very slow link loader. Fixing the link loader is really hard. Instead memoize the output of those two commands. This patch series first separates all the code dealing with qemu into a separate module (src/qemu.c) and
2016 May 30
0
[PATCH v2 3/3] p2v: Allow virt-p2v to be built with Gtk 2 or 3.
...l, - 0, 1, 1, 2, GTK_FILL, GTK_FILL, 4, 4); + set_alignment (port_label, 1., 0.5); + table_attach (table, port_label, + 0, 1, 1, 2, GTK_FILL, GTK_FILL, 4, 4); port_entry = gtk_entry_new (); gtk_entry_set_width_chars (GTK_ENTRY (port_entry), 6); snprintf (port_str, sizeof port_str, "%d", config->port); gtk_entry_set_text (GTK_ENTRY (port_entry), port_str); - gtk_table_attach (GTK_TABLE (table), port_entry, - 1, 2, 1, 2, GTK_FILL, GTK_FILL, 4, 4); + table_attach (table, port_entry, + 1, 2, 1, 2, GTK_FILL, GT...
2016 May 30
1
[PATCH v3] p2v: Allow virt-p2v to be built with Gtk 2 or 3.
This version of the Gtk 2/3 patch gets alignment and padding mostly right. I still can't work out how to vertically align labels in the middle of a cell in a GtkGrid. The GtkTextView in the final dialog is still broken. Rich.
2007 Nov 06
1
[PATCH] ActionController::CgiRequest#host_with_port() should handle standard port
Hi everyone, I''m looking for some +1''s for a bug fix patch I submitted: http://dev.rubyonrails.org/ticket/10082 The problem is that CgiRequest#host_with_port() overrides AbstractRequest#host_with_port() and does''nt use port_string() with standard_port() care. So I created patch to rename CgiRequest#host_with_port() to host_with_port_without_standard_port_handling(). And then CgiRequest#host_with_port() is inherited AbstractRequest''s one, which cares standard_port handling. Thank, -- MOROHASHI Kyosuke (moronatu...
2019 Sep 17
7
[PATCH libnbd 0/5] interop: Check that LIBNBD_TLS_ALLOW works against nbdkit.
I was a little surprised to find that LIBNBD_TLS_ALLOW worked out of the box, so I had to examine the logs whereupon I saw the magic message ... libnbd: debug: nbd1: nbd_connect_command: server refused TLS (policy), continuing with unencrypted connection I don't believe this path has ever been tested before. It's possible the tests could be improved if they actually checked for this
2013 Mar 15
0
[PATCH] lib: Add direct support for the NBD (Network Block Device) protocol.
...inux_imagelabel) == -1) + if (make_drive_priv (g, drv, g->virt_selinux_imagelabel) == -1) goto cleanup; } @@ -1044,7 +1045,8 @@ construct_libvirt_xml_disk (guestfs_h *g, { char drive_name[64] = "sd"; char scsi_target[64]; - struct drive_libvirt *drv_priv; + char port_str[64]; + struct drive_libvirt *drv_priv = (struct drive_libvirt *) drv->priv; CLEANUP_FREE char *format = NULL; int is_host_device; @@ -1057,47 +1059,86 @@ construct_libvirt_xml_disk (guestfs_h *g, guestfs___drive_name (drv_index, &drive_name[2]); snprintf (scsi_target, sizeof s...