summaryrefslogtreecommitdiff
path: root/slirp
diff options
context:
space:
mode:
Diffstat (limited to 'slirp')
-rw-r--r--slirp/ip_input.c1
-rw-r--r--slirp/slirp.c8
2 files changed, 7 insertions, 2 deletions
diff --git a/slirp/ip_input.c b/slirp/ip_input.c
index 0356eb587b..b07d3d5d5d 100644
--- a/slirp/ip_input.c
+++ b/slirp/ip_input.c
@@ -59,7 +59,6 @@ void
ip_init(void)
{
ipq.ip_link.next = ipq.ip_link.prev = &ipq.ip_link;
- ip_id = tt.tv_sec & 0xffff;
udp_init();
tcp_init();
}
diff --git a/slirp/slirp.c b/slirp/slirp.c
index ea66c0cee7..02f6fe50fc 100644
--- a/slirp/slirp.c
+++ b/slirp/slirp.c
@@ -234,7 +234,7 @@ void slirp_init(int restricted, struct in_addr vnetwork,
vdhcp_startaddr = vdhcp_start;
vnameserver_addr = vnameserver;
- register_savevm("slirp", 0, 1, slirp_state_save, slirp_state_load, NULL);
+ register_savevm("slirp", 0, 2, slirp_state_save, slirp_state_load, NULL);
}
#define CONN_CANFSEND(so) (((so)->so_state & (SS_FCANTSENDMORE|SS_ISFCONNECTED)) == SS_ISFCONNECTED)
@@ -973,6 +973,8 @@ static void slirp_state_save(QEMUFile *f, void *opaque)
slirp_socket_save(f, so);
}
qemu_put_byte(f, 0);
+
+ qemu_put_be16(f, ip_id);
}
static void slirp_tcp_load(QEMUFile *f, struct tcpcb *tp)
@@ -1103,5 +1105,9 @@ static int slirp_state_load(QEMUFile *f, void *opaque, int version_id)
so->extra = (void *)ex_ptr->ex_exec;
}
+ if (version_id >= 2) {
+ ip_id = qemu_get_be16(f);
+ }
+
return 0;
}