[Slirp] [Git][slirp/libslirp][master] 2 commits: Initialize sin6_scope_id to zero
Samuel Thibault (@sthibaul)
gitlab at gitlab.freedesktop.org
Tue Sep 14 20:30:10 UTC 2021
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
6cc7c463 by Saar Gross at 2021-09-14T09:46:55-07:00
Initialize sin6_scope_id to zero
sin6_scope_id is not explicitly set to zero in tcp_input() which should be OK
for global IPv6 addresses, but seems to fail on Mac OS: if sin6_scope_id ends up
with a value other than zero for global addresses, connect() will fail with "No
route to host".
Tested on Mac OS v11.5.2 but might be an issue on other versions as well.
Signed-off-by: Saar Gross <saar at fb.com>
Signed-off-by: Mohan Kumar Kumar <mohankm at fb.com>
- - - - -
14e75d1c by Samuel Thibault at 2021-09-14T20:29:57+00:00
Merge branch 'sin6_scope_fix' into 'master'
Initialize sin6_scope_id to zero
See merge request slirp/libslirp!102
- - - - -
1 changed file:
- src/tcp_input.c
Changes:
=====================================
src/tcp_input.c
=====================================
@@ -218,6 +218,9 @@ void tcp_input(struct mbuf *m, int iphlen, struct socket *inso,
DEBUG_CALL("tcp_input");
DEBUG_ARG("m = %p iphlen = %2d inso = %p", m, iphlen, inso);
+ memset(&lhost, 0, sizeof(struct sockaddr_storage));
+ memset(&fhost, 0, sizeof(struct sockaddr_storage));
+
/*
* If called with m == 0, then we're continuing the connect
*/
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/6ec031b297b3f9bebd692511492367b4f14e50b4...14e75d1c6d1509259be070725c5128abf340275f
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/6ec031b297b3f9bebd692511492367b4f14e50b4...14e75d1c6d1509259be070725c5128abf340275f
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/20210914/7c5551ac/attachment.htm>
More information about the Slirp
mailing list