From: Marc-André Lureau
An overdue cleanup. Remaining declarations could probably be moved in
other headers, such as slirp.h.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/main.h | 29 -
1 file changed, 29 deletions(-)
diff --git a
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Reviewed-by: Daniel P. Berrangé
Signed-off-by: Samuel Thibault
---
slirp/slirp.h| 3 ---
slirp/slirp_config.h | 3 ---
2 files changed, 6 deletions(-)
diff --git a/slirp/slirp.h b/slirp/slirp.h
index f7c087456a..4c3c672ee6
r_with_oob() since the code is actually similar
to what socketpair() would do, except that it uses TCP sockets, for
SLIRP to be able to call send with MSG_OOB (since SO_OOBINLINE is set,
this could probably be faked instead on regular unix sockets though).
Signed-off-by: Marc-André Lureau
Signed-off-
From: Marc-André Lureau
Clarify that those functions are internal to slirp.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/libslirp.h | 3 ---
slirp/slirp.h| 3 +++
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/slirp/libslirp.h b/slirp
From: Marc-André Lureau
Now it's only used for the chardev pointer.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/slirp.c| 4 ++--
slirp/socket.h | 2 +-
slirp/tcp_subr.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/slirp/slir
From: Marc-André Lureau
Signed-off-by: Marc-André Lureau
Reviewed-by: Daniel P. Berrangé
Signed-off-by: Samuel Thibault
---
slirp/slirp.h| 4
slirp/slirp_config.h | 3 ---
2 files changed, 7 deletions(-)
diff --git a/slirp/slirp.h b/slirp/slirp.h
index 400f585cec..1f47848271
From: Gerd Hoffmann
Useful when debugging pxeboot, to see what the guest tries to do.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Liam Merwick
Reviewed-by: Philippe Mathieu-Daudé
Tested-by: Philippe Mathieu-Daudé
Signed-off-by: Samuel Thibault
---
Makefile.objs | 1 +
slirp/tftp.c
From: Marc-André Lureau
Free the list elements allocated in add_exec().
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/misc.h | 2 +-
slirp/slirp.c | 8
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/slirp/misc.h b/slirp/misc.h
index
From: Marc-André Lureau
Let's make the slirp interface a bit more library-like.
Associate the slirp_output() with a Slirp context.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 5 +++--
slirp/libslirp.h | 9 +
slirp/ncsi.c | 2 +-
From: Marc-André Lureau
Let's not mix command line and chardev pointers.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
net/slirp.c | 8
slirp/libslirp.h | 2 +-
slirp/misc.c | 11 +++
slirp/misc.h | 4 ++--
slirp/slirp.c
From: Marc-André Lureau
EMU_RSH handling was dropped in commit
0d62c4cfe21752df4c1d6e2c2398f15d5eaa794a.
The assignment, and subsequent free() of ex_ptr->ex_exec to so->extra
looks unsafe (double free is likely to occur).
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Th
From: Marc-André Lureau
do_pty == 3 means to talk to a chardev.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/misc.c | 2 +-
slirp/misc.h | 2 +-
slirp/slirp.c| 4 ++--
slirp/tcp_subr.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)
diff
From: Marc-André Lureau
QEMU uses fork_exec() with do_pty values 0 or 3.
Let's clean up some unused code.
Signed-off-by: Marc-André Lureau
Signed-off-by: Samuel Thibault
---
slirp/misc.c | 55 ++--
slirp/misc.h | 2 +-
slirp/tcp_s
Marc-André Lureau, le jeu. 22 nov. 2018 11:13:51 +0400, a ecrit:
> With s/unlikely/G_UNLIKELY:
> Reviewed-by: Marc-André Lureau
Right, pushed, thanks :)
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:31 +0400, a ecrit:
> We are moving to g_log() facilities to log errors and probably debug
> messages too. Let's have the "Slirp" prefix on messages slirp produces.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Hello,
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:42 +0400, a ecrit:
> Remove a dependency on QEMU. Use the existing logging facilities.
> Set SLIRP_DEBUG=tftp to get tftp log.
As mentioned before, I was hesitating to replace the tracing with a
DEBUG call. Now that I have merged to my tree th
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:28 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:30 +0400, a ecrit:
> This will allow to have cflags for the whole slirp.mo -objs.
> It makes it possible to build tests that links only with
> slirp-obj-y (and not the whole common-obj).
>
> It is also a step towards building slirp as a shared library,
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:41 +0400, a ecrit:
> Make slirp use GLib logging, instead of fprintf(), so that
> applications can filter log, process it etc.
>
> With recent versions of glib, G_MESSAGES_DEBUG must be set to "all" or
> "Slirp" to see slirp debug messages.
>
> Reform
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:36 +0400, a ecrit:
> Make debug statements condiitonal only on slirp_debug flags, instead
> of the pre-processor DEBUG blocks, as it may introduce breakage
> easily, since the debug code isn't always compiled.
>
> Signed-off-by: Marc-André Lureau
App
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:23 +0400, a ecrit:
> This will allow reusing the function in a following patch.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:37 +0400, a ecrit:
> Learn to read SLIRP_DEBUG=call,misc,error (all or help also handled)
> to set the slirp_debug flags.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:40 +0400, a ecrit:
> There is no clear benefit in calling an alias DEBUG_ARGS(). Replace
> calls with DEBUG_ARG(), and fix the white-spacing while at it.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:39 +0400, a ecrit:
> Instead, rely on slirp_debug flags, or compile unconditionally (the
> substraction in cksum is unlikely to affect any benchmark result).
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:33 +0400, a ecrit:
> Remove some clutter, and avoids direct call to fprintf().
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
to get them out of the hot path.
Signed-off-by: Samuel Thibault
---
slirp/debug.h | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/slirp/debug.h b/slirp/debug.h
index ff920f0b87..ad4e07aa01 100644
--- a/slirp/debug.h
+++ b/slirp/debug.h
@@ -17,7 +17,7 @@
extern int
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:38 +0400, a ecrit:
> This fixes some compilation warnings on mingw64.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:32 +0400, a ecrit:
> Reduce dependency on QEMU. QEMU could use a custom glib log handler if
> it wants to redirect/filter it.
>
> Signed-off-by: Marc-André Lureau
Applied, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:34 +0400, a ecrit:
> icmp_send_error() doesnt actually log messages when DEBUG is enabled.
> Let's use a different define that describes better the tweaked
> behaviour of the function, and avoid uncompiled code.
>
> Signed-off-by: Marc-André Lureau
A
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:27 +0400, a ecrit:
> Make all packets expiration time based on virtual clock.
>
> Suggested-by: Paolo Bonzini
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:35 +0400, a ecrit:
> DEBUG_CALL is already handled conditionally.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:22 +0400, a ecrit:
> This list is not only used to handle command to execute on guest
> connection, it can also redirect to an arbitrary object, such as a
> chardev. Let's rename the struct and the field to "guestfwd".
>
> Signed-off-by: Marc-André Lur
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:18 +0400, a ecrit:
> Somehow, I broke the build and failed to detect it. Please squash!
> +#include "qemu/osdep.h"
> +
> +typedef uint32_t tcp_seq;
I preferred to just use uint32_t instead of tcp_seq in the couple of
places where this showed up.
> /
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:21 +0400, a ecrit:
> Use g_spawn_async_with_fds() to setup the child.
>
> GSpawn handles reaping the child, and closing parent file descriptors.
>
> Signed-off-by: Marc-André Lureau
Ditto.
Samuel
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:20 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
> Reviewed-by: Samuel Thibault
I had actually already included it in my tree.
Samuel
Marc-André Lureau, le jeu. 22 nov. 2018 02:06:19 +0400, a ecrit:
> Since commit 12f8def0e02232d7c6416ad9b66640f973c531d1 (v2.9), qemu
> requires Vista. Let's remove some conditional code.
>
> Note that this introduces a missing declaration warning with mingw.
> warning: implicit declaration of fun
Philippe Mathieu-Daudé, le mer. 14 nov. 2018 14:21:36 +0100, a ecrit:
> > Signed-off-by: Marc-André Lureau
>
> Reviewed-by: Philippe Mathieu-Daudé
> Tested-by: Philippe Mathieu-Daudé
Applied to my tree, thanks!
Philippe Mathieu-Daudé, le mer. 14 nov. 2018 14:17:56 +0100, a ecrit:
> On 14/11/18 13:36, Marc-André Lureau wrote:
> > Do not require QEMU macro.
> >
> > Signed-off-by: Marc-André Lureau
>
> Reviewed-by: Philippe Mathieu-Daudé
Daniel P. Berrangé, le mer. 14 nov. 2018 14:15:15 +, a ecrit:
Daniel P. Berrangé, le mer. 14 nov. 2018 14:12:06 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:38PM +0400, Marc-André Lureau wrote:
> > Untouched since original introduction in 2004.
> >
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/tcp_input.c | 23 +--
> > 1 fil
Daniel P. Berrangé, le mer. 14 nov. 2018 14:11:34 +, a ecrit:
> NULL is defined in stddef.h for at least 15 years AFAICT, so
> even glib shouldn't bother to define it :-) So I'd suggest
> changing $subject to just defer to stddef.h
>
> On Wed, Nov 14, 2018 at 04:36:37PM +0400, Marc-André Lure
Marc-André Lureau, le mer. 14 nov. 2018 16:36:35 +0400, a ecrit:
> Use a "slirp socket" helper function to call the callback when
> sbdrop() returns true.
It's really far from clear what this should be doing :)
I'd say find out how to rephrase 86073017e384 ("slirp: Signal free input
buffer space
Daniel P. Berrangé, le mer. 14 nov. 2018 14:05:33 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:34PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/sbuf.h | 1 -
> > 1 file changed, 1 deletion(-)
>
> Reviewed-by: Daniel P. Berrangé
Applied to my tree,
Daniel P. Berrangé, le mer. 14 nov. 2018 14:07:38 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:36PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/ip_input.c | 200 --
> > slirp/tcp_input.c | 39 -
> >
Marc-André Lureau, le mer. 14 nov. 2018 16:36:33 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le mer. 14 nov. 2018 16:36:32 +0400, a ecrit:
> Remove a dependency on QEMU. Use the existing logging facilities.
I'm hesitating on this one: this is not really a debugging print (as in
qemu debugging), but a real user debugging print. We do want to compile
this in without DEBUG
Marc-André Lureau, le mer. 14 nov. 2018 16:36:31 +0400, a ecrit:
> Let them accept multiple arguments. Simplify the inner argument
> handling of DEBUG_ARGS/DEBUG_MISC_DEBUG_ERROR.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le mer. 14 nov. 2018 16:36:30 +0400, a ecrit:
> Reduce dependency on QEMU. QEMU could use a custom log handler if it
> wants to redirect/filter it.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Marc-André Lureau, le mer. 14 nov. 2018 16:36:28 +0400, a ecrit:
> Use a global variable instead (similar to slirp_debug)
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Philippe Mathieu-Daudé, le mer. 14 nov. 2018 14:14:35 +0100, a ecrit:
> On 14/11/18 13:36, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
>
> Reviewed-by: Philippe Mathieu-Daudé
Applied to my tree, thanks!
Daniel P. Berrangé, le mer. 14 nov. 2018 13:55:18 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:29PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h | 2 --
> > 1 file changed, 2 deletions(-)
>
> Reviewed-by: Daniel P. Berrangé
Applied to my tre
Daniel P. Berrangé, le mer. 14 nov. 2018 13:52:12 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:23PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h| 2 +-
> > slirp/slirp_config.h | 6 --
> > 2 files changed, 1 insertion(+), 7 deletion
Philippe Mathieu-Daudé, le mer. 14 nov. 2018 14:14:16 +0100, a ecrit:
> On 14/11/18 13:36, Marc-André Lureau wrote:
> > One more step towards making the project independent from QEMU.
> >
> > Signed-off-by: Marc-André Lureau
>
> Reviewed-by: Philippe Mathieu-Daudé
Daniel P. Berrangé, le mer. 1
Daniel P. Berrangé, le mer. 14 nov. 2018 13:51:29 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:22PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h| 2 +-
> > slirp/slirp_config.h | 6 --
> > 2 files changed, 1 insertion(+), 7 deletion
Daniel P. Berrangé, le mer. 14 nov. 2018 13:54:33 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:25PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp_config.h | 6 --
> > 1 file changed, 6 deletions(-)
>
> Reviewed-by: Daniel P. Berrangé
Applie
Daniel P. Berrangé, le mer. 14 nov. 2018 13:53:31 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:24PM +0400, Marc-André Lureau wrote:
> > It's actually qemu configure CONFIG_IOVEC that is being used.
>
> That makes it sound like slirp is using CONFIG_IOVEC, but AFAICT
> that's only used by QEMU's
Daniel P. Berrangé, le mer. 14 nov. 2018 13:51:01 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:21PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/main.h | 4
> > slirp/slirp.h| 4
> > slirp/slirp_config.h | 6 --
> > 3 file
Daniel P. Berrangé, le mer. 14 nov. 2018 13:49:08 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:18PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h| 5 -
> > slirp/slirp_config.h | 3 ---
> > 2 files changed, 8 deletions(-)
>
> Review
Daniel P. Berrangé, le mer. 14 nov. 2018 13:50:33 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:20PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h| 4
> > slirp/slirp_config.h | 3 ---
> > 2 files changed, 7 deletions(-)
>
> Reviewe
Daniel P. Berrangé, le mer. 14 nov. 2018 13:50:01 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:19PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp_config.h | 6 --
> > 1 file changed, 6 deletions(-)
>
> Reviewed-by: Daniel P. Berrangé
Applie
Daniel P. Berrangé, le mer. 14 nov. 2018 13:48:37 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:17PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h| 3 ---
> > slirp/slirp_config.h | 6 --
> > 2 files changed, 9 deletions(-)
>
> Revie
Daniel P. Berrangé, le mer. 14 nov. 2018 13:47:57 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:16PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h| 4
> > slirp/slirp_config.h | 3 ---
> > 2 files changed, 7 deletions(-)
>
> Reviewe
Daniel P. Berrangé, le mer. 14 nov. 2018 13:47:32 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:15PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/slirp.h| 3 ---
> > slirp/slirp_config.h | 3 ---
> > 2 files changed, 6 deletions(-)
>
> Reviewed
g_spawn_async_with_fds is portable on Windows, so we can now enable
fork_exec support there.
Thanks Daniel P. Berrangé for the notice!
Signed-off-by: Samuel Thibault
---
slirp/misc.c | 14 ++
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/slirp/misc.c b/slirp/misc.c
Daniel P. Berrangé, le mer. 14 nov. 2018 13:46:46 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:14PM +0400, Marc-André Lureau wrote:
> > The soread() function may be used on datagram sockets, and would
> > provide different behaviour if HAVE_READV was set, on empty datagrams.
> > This looks like
Daniel P. Berrangé, le mer. 14 nov. 2018 13:46:02 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:13PM +0400, Marc-André Lureau wrote:
> > Looking at git history, this looks like something from the past, when
> > there was a tty layer. Let's remove it.
> >
> > Signed-off-by: Marc-André Lureau
> >
Philippe Mathieu-Daudé, le mer. 14 nov. 2018 14:12:04 +0100, a ecrit:
> On 14/11/18 13:36, Marc-André Lureau wrote:
> > Nobody cares for over 14y. Somebody can revert or rewrite if
> > interested by that.
> >
> > Signed-off-by: Marc-André Lureau
>
> Reviewed-by: Philippe Mathieu-Daudé
Daniel P
Paolo Bonzini, le jeu. 15 nov. 2018 13:54:02 +0100, a ecrit:
> On 14/11/2018 13:36, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/libslirp.h | 6 ++
> > net/slirp.c | 19 +++
> > slirp/if.c | 2 +-
> > slirp/ip6_icmp.c | 6 --
Philippe Mathieu-Daudé, le mer. 14 nov. 2018 14:10:15 +0100, a ecrit:
> With the const qualifier:
> Reviewed-by: Philippe Mathieu-Daudé
Stefan Hajnoczi, le mer. 14 nov. 2018 14:30:14 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:07PM +0400, Marc-André Lureau wrote:
> > -typedef void (*slirp_out
Daniel P. Berrangé, le mer. 14 nov. 2018 13:32:57 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:06PM +0400, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau
> > ---
> > slirp/mbuf.h | 1 -
> > 1 file changed, 1 deletion(-)
>
> Reviewed-by: Daniel P. Berrangé
Applied to my tree,
Hello,
Daniel P. Berrangé, le mer. 14 nov. 2018 14:22:34 +, a ecrit:
> On Wed, Nov 14, 2018 at 04:36:05PM +0400, Marc-André Lureau wrote:
> > Use g_spawn_async_with_fds() to setup the child.
> >
> > GSpawn handles reaping the child, and closing parent file descriptors.
>
> The g_spawn* famil
Marc-André Lureau, le mer. 14 nov. 2018 16:36:05 +0400, a ecrit:
> Use g_spawn_async_with_fds() to setup the child.
>
> GSpawn handles reaping the child, and closing parent file descriptors.
>
> Signed-off-by: Marc-André Lureau
Applied to my slirp-2 tree, thanks!
Samuel
Marc-André Lureau, le mer. 14 nov. 2018 16:36:04 +0400, a ecrit:
> Signed-off-by: Marc-André Lureau
Reviewed-by: Samuel Thibault
include/glib-compat.h maintainers, may I keep this in my slirp tree, to
be pushed to master when appropriate?
Samuel
> ---
> include/glib-comp
Hello,
Marc-André Lureau, le mer. 14 nov. 2018 16:36:03 +0400, a ecrit:
> Originally, the patch was fixing a bunch of issues, but Peter beat me
> to it with earlier commit "slirp: fork_exec(): create and connect
> child socket before fork()".
>
> Factor out socket pair creation, to simplify the f
Gerd Hoffmann, le mar. 13 nov. 2018 08:03:20 +0100, a ecrit:
> Useful when debugging pxeboot, to see what the guest tries to do.
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le mar. 13 nov. 2018 00:26:39 +0400, a ecrit:
> An overdue cleanup. Remaining declarations could probably be moved in
> other headers, such as slirp.h.
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:46 +0400, a ecrit:
> Use the glib function for the work, fix a potential crash on >256 words.
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:44 +0400, a ecrit:
> Free the list elements allocated in add_exec().
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:43 +0400, a ecrit:
> There is nothing performance-sensitive in returning an allocated
> string for info, and handling the monitor_printf() on the caller side.
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:42 +0400, a ecrit:
> Clarify that those functions are internal to slirp.
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:41 +0400, a ecrit:
> Now it's only used for the chardev pointer.
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:40 +0400, a ecrit:
> EMU_RSH handling was dropped in commit
> 0d62c4cfe21752df4c1d6e2c2398f15d5eaa794a.
>
> The assignment, and subsequent free() of ex_ptr->ex_exec to so->extra
> looks unsafe (double free is likely to occur).
Applied to my tree, than
Marc-André Lureau, le sam. 10 nov. 2018 17:45:39 +0400, a ecrit:
> Let's not mix command line and chardev pointers.
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:38 +0400, a ecrit:
> do_pty == 3 means to talk to a chardev.
Applied to my tree, thanks!
Peter Maydell, le sam. 10 nov. 2018 14:04:10 +, a ecrit:
> On 10 November 2018 at 13:53, Samuel Thibault wrote:
> > Marc-André Lureau, le sam. 10 nov. 2018 17:45:45 +0400, a ecrit:
> >> @@ -163,23 +183,14 @@ fork_exec(struct socket *so, const char *ex)
> &g
The following changes since commit 160e5c22e55b3f775c2003dfc626fa872ee4a7a1:
Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
(2018-11-09 10:54:10 +)
are available in the Git repository at:
https://people.debian.org/~sthibault/qemu.git tags/samue
il slirp_send().
Signed-off-by: Peter Maydell
Signed-off-by: Samuel Thibault
---
slirp/slirp.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/slirp/slirp.c b/slirp/slirp.c
index 51de41fc02..3c3c03b22f 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -1091,6 +1091,17 @@ ssize_t
From: Peter Maydell
The slirp socreate() function can only fail if the attempt
to malloc() the struct socket fails. Switch to using
g_new() instead, which will allow us to remove the
error-handling code from its callers.
Signed-off-by: Peter Maydell
Signed-off-by: Samuel Thibault
---
slirp
Marc-André Lureau, le sam. 10 nov. 2018 17:45:37 +0400, a ecrit:
> QEMU uses fork_exec() with do_pty values 0 or 3.
> Let's clean up some unused code.
Applied to my tree, thanks!
> Signed-off-by: Marc-André Lureau
> ---
> slirp/misc.h | 2 +-
> slirp/misc.c | 55 ++-
on to
handle a possible failure.
Signed-off-by: Peter Maydell
Signed-off-by: Samuel Thibault
---
slirp/misc.c | 55
1 file changed, 34 insertions(+), 21 deletions(-)
diff --git a/slirp/misc.c b/slirp/misc.c
index 260187b6b6..57bdd808e2 100644
drlen));
if the accept() call fails then we pass closesocket() -1
instead of a valid file descriptor.
Signed-off-by: Peter Maydell
Signed-off-by: Samuel Thibault
---
slirp/ip_icmp.c | 2 +-
slirp/slirp.c | 3 ---
slirp/socket.c| 3 ---
slirp/tcp_input.c | 3 +--
slirp/tcp_subr.c | 5 -
Marc-André Lureau, le sam. 10 nov. 2018 17:45:36 +0400, a ecrit:
> Let's make the slirp interface a bit more library-like.
> Associate the slirp_output() with a Slirp context.
>
> Signed-off-by: Marc-André Lureau
Applied to my tree, thanks!
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:48 +0400, a ecrit:
> Use g_spawn_async_with_fds() to setup the child.
>
> GSpawn handles reaping the child, and closing parent file descriptors.
Similarly :)
Samuel
Marc-André Lureau, le sam. 10 nov. 2018 17:45:45 +0400, a ecrit:
> @@ -163,23 +183,14 @@ fork_exec(struct socket *so, const char *ex)
> exit(1);
>
>default:
> - qemu_add_child_watch(pid);
> -/*
> - * XXX this could block us...
> -
Peter Maydell, le mar. 06 nov. 2018 15:13:22 +, a ecrit:
> Now that socreate() can never fail, we can remove the code
> that was trying to handle that situation.
>
> In particular this removes code in tcp_connect() that
> provoked Coverity to complain (CID 1005724): in
> closesocket(accept(in
Peter Maydell, le mar. 06 nov. 2018 15:13:23 +, a ecrit:
> Currently fork_exec() fork()s, and then creates and connects the
> child socket which it uses for communication with the parent in
> the child process. This is awkward because the child has no
> mechanism to report failure back to the p
Peter Maydell, le mar. 06 nov. 2018 15:13:21 +, a ecrit:
> The slirp socreate() function can only fail if the attempt
> to malloc() the struct socket fails. Switch to using
> g_new() instead, which will allow us to remove the
> error-handling code from its callers.
>
> Signed-off-by: Peter May
Peter Maydell, le mar. 06 nov. 2018 15:13:20 +, a ecrit:
> Coverity complains (CID 1005726) that we might pass -1 as the fd
> argument to send() in slirp_send(), because we previously checked for
> "so->s == -1 && so->extra". The case of "so->s == -1 but so->extra
> NULL" should not in theory
Maxim Samoylov, le mar. 30 oct. 2018 16:58:17 +0300, a ecrit:
> On 27.10.2018 14:11, Samuel Thibault wrote:
> > Is there a reason why you set SO_OOBINLINE, but not TCP_NODELAY? That's
> > the kind of discrepancy we don't want to let unseen, thus the reason for
&g
Maxim Samoylov, le ven. 26 oct. 2018 03:03:43 +0300, a ecrit:
> +void hmp_ipv6_hostfwd_remove(Monitor *mon, const QDict *qdict)
> +{
Similarly, a lot can be shared, by introducing
const char *hmp_hostfwd_lookup(Monitor *mon, const QDict *qdict, int is_v6)
which will contain all the lookup and t
Hello,
Maxim Samoylov, le ven. 26 oct. 2018 03:03:42 +0300, a ecrit:
> +int slirp_remove_ipv6_hostfwd(Slirp *slirp, int is_udp,
> + struct in6_addr host_addr, int host_port)
Similarly, we'd rather share the code than duplicate it :)
Better put the existing slirp_remo
601 - 700 of 1571 matches
Mail list logo