qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 0bed71: slirp: allow host port 0 for hostfwd


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 0bed71: slirp: allow host port 0 for hostfwd
Date: Wed, 03 May 2017 02:24:53 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 0bed71edbc323de12ed1e5390a85a013f6a143f4
      
https://github.com/qemu/qemu/commit/0bed71edbc323de12ed1e5390a85a013f6a143f4
  Author: Vincent Bernat <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M net/slirp.c

  Log Message:
  -----------
  slirp: allow host port 0 for hostfwd

The OS will allocate automatically a free port. This is useful if you
want to be sure to not get any port conflict. You still have to figure
out which port you got, for example with "lsof" (this could be exposed
in the monitor if needed).

Example of use:

     $ qemu-system-x86_64 -net user,hostfwd=127.0.0.1:0-:22 ...

Then, get your port with:

     $ lsof -np 1474 | grep LISTEN
     qemu-syst 31777 bernat 12u IPv4 [...] TCP 127.0.0.1:35145 (LISTEN)

Signed-off-by: Vincent Bernat <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: f95cc8b6cc3ad8c4b687f305a978d67091c28138
      
https://github.com/qemu/qemu/commit/f95cc8b6cc3ad8c4b687f305a978d67091c28138
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M net/slirp.c

  Log Message:
  -----------
  slirp/smb: Replace constant strings by glib string

gcc 7 (on fedora 26) objects to many of the snprintf's
in the smb path and command creation because it can't
figure out that the smb_dir (i.e. the /tmp dir for the configuration)
is known to be short.

Replace all these fixed length buffers by g_str* functions that dynamically
allocate and use g_dir_make_tmp to make the directory.
(It's fairly new glib but we have a compat function for it).

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 17eb587aeb492fe68f8130b027154ff0921fc0b4
      
https://github.com/qemu/qemu/commit/17eb587aeb492fe68f8130b027154ff0921fc0b4
  Author: Marc-André Lureau <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M slirp/tftp.c

  Log Message:
  -----------
  slirp: tftp, copy sockaddr_size

ASAN detects an "unknown-crash" when running pxe-test:

/ppc64/pxe/spapr-vlan: 
=================================================================
==7143==ERROR: AddressSanitizer: unknown-crash on address 0x7f6dcd298d30 at pc 
0x55e22218830d bp 0x7f6dcd2989e0 sp 0x7f6dcd2989d0
READ of size 128 at 0x7f6dcd298d30 thread T2
    #0 0x55e22218830c in tftp_session_allocate 
/home/elmarco/src/qq/slirp/tftp.c:73
    #1 0x55e22218a1f8 in tftp_handle_rrq /home/elmarco/src/qq/slirp/tftp.c:289
    #2 0x55e22218b54c in tftp_input /home/elmarco/src/qq/slirp/tftp.c:446
    #3 0x55e2221833fe in udp6_input /home/elmarco/src/qq/slirp/udp6.c:82
    #4 0x55e222137b17 in ip6_input /home/elmarco/src/qq/slirp/ip6_input.c:67

Address 0x7f6dcd298d30 is located in stack of thread T2 at offset 96 in frame
    #0 0x55e222182420 in udp6_input /home/elmarco/src/qq/slirp/udp6.c:13

  This frame has 3 object(s):
    [32, 48) '<unknown>'
    [96, 124) 'lhost' <== Memory access at offset 96 partially overflows this 
variable
    [160, 200) 'save_ip' <== Memory access at offset 96 partially underflows 
this variable

The sockaddr_storage pointer is the sockaddr_in6 lhost on the
stack. Copy only the source addr size.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 7d1724976f1f460769f4dddcdb15369cd57cf72e
      
https://github.com/qemu/qemu/commit/7d1724976f1f460769f4dddcdb15369cd57cf72e
  Author: Samuel Thibault <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M slirp/ip_icmp.c

  Log Message:
  -----------
  slirp: fix pinging the virtual ipv4 DNS server

so that people do not think it is not working at least basically.

Signed-off-by: Samuel Thibault <address@hidden>


  Commit: e3ec38ffd6eeff3c3db9f0fd942e37a60f36e86c
      
https://github.com/qemu/qemu/commit/e3ec38ffd6eeff3c3db9f0fd942e37a60f36e86c
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M slirp/slirp.c
    M slirp/tcp_var.h

  Log Message:
  -----------
  slirp: VMState conversion; tcpcb

Convert the migration of the struct tcpcb to use a VMStateDescription,
the rest of it will come later.

Mostly mechanical, except for conversion of some 'char' to uint8_t
to ensure portability.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Samuel Thibault <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 2a7cab9e17bbe78f37c7515278eefc32876fa7a2
      
https://github.com/qemu/qemu/commit/2a7cab9e17bbe78f37c7515278eefc32876fa7a2
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M slirp/sbuf.h
    M slirp/slirp.c

  Log Message:
  -----------
  slirp: VMStatify sbuf

Convert the sbuf structure to a VMStateDescription.
Note this uses the VMSTATE_WITH_TMP mechanism to calculate
and reload the offsets based on the pointers.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: David Gibson <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 7eddf37c63d20367989fc0ecb25460b64817f6df
      
https://github.com/qemu/qemu/commit/7eddf37c63d20367989fc0ecb25460b64817f6df
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M slirp/socket.h

  Log Message:
  -----------
  slirp: Common lhost/fhost union

The socket structure has a pair of unions for lhost and fhost
addresses; the unions are identical so split them out into
a separate union declaration.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: 14650df4020c60be6c498f05622ac07338cebb09
      
https://github.com/qemu/qemu/commit/14650df4020c60be6c498f05622ac07338cebb09
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M slirp/slirp.c
    M slirp/socket.h

  Log Message:
  -----------
  slirp: VMStatify socket level

Working up the stack, this replaces the slirp_socket_load/save
with VMState definitions.

A place holder for IPv6 support is added as a comment; it needs
testing once the rest of the IPv6 code is there.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: eb5d4f5329df83ea15244b47f7fbca21adaae41b
      
https://github.com/qemu/qemu/commit/eb5d4f5329df83ea15244b47f7fbca21adaae41b
  Author: Dr. David Alan Gilbert <address@hidden>
  Date:   2017-04-29 (Sat, 29 Apr 2017)

  Changed paths:
    M slirp/slirp.c

  Log Message:
  -----------
  slirp: VMStatify remaining except for loop

This converts the remaining components, except for the top level
loop, to VMState.

Signed-off-by: Dr. David Alan Gilbert <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: Samuel Thibault <address@hidden>


  Commit: e619b14746e5d8c0e53061661fd0e1da01fd4d60
      
https://github.com/qemu/qemu/commit/e619b14746e5d8c0e53061661fd0e1da01fd4d60
  Author: Stefan Hajnoczi <address@hidden>
  Date:   2017-05-02 (Tue, 02 May 2017)

  Changed paths:
    M net/slirp.c
    M slirp/ip_icmp.c
    M slirp/sbuf.h
    M slirp/slirp.c
    M slirp/socket.h
    M slirp/tcp_var.h
    M slirp/tftp.c

  Log Message:
  -----------
  Merge remote-tracking branch 'sthibault/tags/samuel-thibault' into staging

slirp updates

# gpg: Signature made Sat 29 Apr 2017 05:45:24 PM BST
# gpg:                using RSA key 0xB0A51BF58C9179C5
# gpg: Good signature from "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# gpg:                 aka "Samuel Thibault <address@hidden>"
# Primary key fingerprint: 900C B024 B679 31D4 0F82  304B D017 8C76 7D06 9EE6
#      Subkey fingerprint: AEBF 7448 FAB9 453A 4552  390E B0A5 1BF5 8C91 79C5

* sthibault/tags/samuel-thibault:
  slirp: VMStatify remaining except for loop
  slirp: VMStatify socket level
  slirp: Common lhost/fhost union
  slirp: VMStatify sbuf
  slirp: VMState conversion; tcpcb
  slirp: fix pinging the virtual ipv4 DNS server
  slirp: tftp, copy sockaddr_size
  slirp/smb: Replace constant strings by glib string
  slirp: allow host port 0 for hostfwd

Signed-off-by: Stefan Hajnoczi <address@hidden>


Compare: https://github.com/qemu/qemu/compare/38bb54f323bf...e619b14746e5

reply via email to

[Prev in Thread] Current Thread [Next in Thread]