diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2012-02-29 19:14:23 +0100 |
---|---|---|
committer | Jan Kiszka <jan.kiszka@siemens.com> | 2012-03-13 14:05:49 +0100 |
commit | a68adc220603baffc355ecea8865b3ea9707ab00 (patch) | |
tree | f2f2c89ddcae603aff1cb0bd44ab169f4d06f4c4 /slirp/ip_input.c | |
parent | f37343197708d90f119007ce5ecc2503be9c04c1 (diff) | |
download | qemu-a68adc220603baffc355ecea8865b3ea9707ab00.zip qemu-a68adc220603baffc355ecea8865b3ea9707ab00.tar.gz qemu-a68adc220603baffc355ecea8865b3ea9707ab00.tar.bz2 |
slirp: Cleanup resources on instance removal
Close & free sockets when shutting down a slirp instance, also release
all buffers.
CC: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Diffstat (limited to 'slirp/ip_input.c')
-rw-r--r-- | slirp/ip_input.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/slirp/ip_input.c b/slirp/ip_input.c index c7b3eb4..ce24faf 100644 --- a/slirp/ip_input.c +++ b/slirp/ip_input.c @@ -61,6 +61,13 @@ ip_init(Slirp *slirp) icmp_init(slirp); } +void ip_cleanup(Slirp *slirp) +{ + udp_cleanup(slirp); + tcp_cleanup(slirp); + icmp_cleanup(slirp); +} + /* * Ip input routine. Checksum and byte swap header. If fragmented * try to reassemble. Process options. Pass to next level. |