[Slirp] [Git][slirp/libslirp][master] 2 commits: state: fix loading of guestfwd state

Marc-André Lureau gitlab at gitlab.freedesktop.org
Thu Jan 30 10:27:42 UTC 2020



Marc-André Lureau pushed to branch master at slirp / libslirp


Commits:
8604ed80 by Anders Waldenborg at 2020-01-30T07:13:12+01:00
state: fix loading of guestfwd state

The refactoring done in commit d181d14b "slirp: use a dedicated field
for chardev pointer" forgot to change one place in slirp_state_load
where 'ex_exec' was used to store the chardev ptr. This broke loading
of saved state.

Later commit 4f38cfb5 "slirp: remove unused EMU_RSH" removed this line
all together, as it now looked like it didn't do anything.

This commit ensures that guestfwd is properly setup on the socket when
loading state.

Signed-off-by: Anders Waldenborg <anders at 0x63.nu>

- - - - -
00ea58dc by Marc-André Lureau at 2020-01-30T10:27:36+00:00
Merge branch 'aw-guestfwd-state' into 'master'

Fix loading of guestfwd state


Unsure how testing usually is done for changes in this project.
I have built qemu with this change and it fixes the bug in my setup (testbed where a system is booted a snapshot is created, and then that snapshot is restored many times to run different tests. Outbound syslog uses a guestfwd to a qemu chardev)


See merge request slirp/libslirp!29
- - - - -


1 changed file:

- src/state.c


Changes:

=====================================
src/state.c
=====================================
@@ -366,6 +366,8 @@ int slirp_state_load(Slirp *slirp, int version_id, SlirpReadCb read_cb,
         if (!ex_ptr) {
             return -EINVAL;
         }
+
+        so->guestfwd = ex_ptr;
     }
 
     return slirp_vmstate_load_state(&f, &vmstate_slirp, slirp, version_id);



View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/compare/68ccb8021a838066f0951d4b2817eb6b6f10a843...00ea58dcaba26863807c7a02a9f3666104b7f1a1

-- 
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/compare/68ccb8021a838066f0951d4b2817eb6b6f10a843...00ea58dcaba26863807c7a02a9f3666104b7f1a1
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20200130/12a90747/attachment-0001.htm>


More information about the Slirp mailing list