diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2018-11-22 02:06:23 +0400 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-01-14 00:44:29 +0100 |
commit | 4246e8cac719317476f5652975f1a4d537b75770 (patch) | |
tree | b850ee828b15b46458b52effb58a483043a4d873 /slirp/misc.c | |
parent | a857d91d8cbf76f9485641fdcbb84ef4e510a67c (diff) |
slirp: factor out guestfwd addition checks
This will allow reusing the function in a following patch.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'slirp/misc.c')
-rw-r--r-- | slirp/misc.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/slirp/misc.c b/slirp/misc.c index a0f104be5e..eae9596a55 100644 --- a/slirp/misc.c +++ b/slirp/misc.c @@ -37,13 +37,6 @@ int add_exec(struct gfwd_list **ex_ptr, void *chardev, const char *cmdline, { struct gfwd_list *tmp_ptr; - /* First, check if the port is "bound" */ - for (tmp_ptr = *ex_ptr; tmp_ptr; tmp_ptr = tmp_ptr->ex_next) { - if (port == tmp_ptr->ex_fport && - addr.s_addr == tmp_ptr->ex_addr.s_addr) - return -1; - } - tmp_ptr = *ex_ptr; *ex_ptr = g_new0(struct gfwd_list, 1); (*ex_ptr)->ex_fport = port; |