[Git][slirp/libslirp][master] Fix calling slirp_bind_outbound on tcp_fconnect
Samuel Thibault (@sthibaul)
gitlab at gitlab.freedesktop.org
Tue Oct 1 12:51:00 UTC 2024
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
6e493d93 by Samuel Thibault at 2024-10-01T14:50:38+02:00
Fix calling slirp_bind_outbound on tcp_fconnect
Fixes 72f85005a230 ("socket abstraction: slirp_os_socket")
- - - - -
1 changed file:
- src/tcp_subr.c
Changes:
=====================================
src/tcp_subr.c
=====================================
@@ -383,7 +383,7 @@ int tcp_fconnect(struct socket *so, unsigned short af)
so->s = slirp_socket(af, SOCK_STREAM, 0);
ret = have_valid_socket(so->s) ? 0 : -1;
- if (ret) {
+ if (ret == 0) {
ret = slirp_bind_outbound(so, af);
if (ret < 0) {
// bind failed - close socket
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/6e493d93ff7fe28d5146c692d009367d4f34f75f
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/6e493d93ff7fe28d5146c692d009367d4f34f75f
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/20241001/386e4b6c/attachment.htm>
More information about the Slirp
mailing list