[Slirp] [Git][slirp/libslirp][master] slirp_socketpair_with_oob: Connect pair through 127.0.0.1
Samuel Thibault (@sthibaul)
gitlab at gitlab.freedesktop.org
Sat Sep 4 23:54:52 UTC 2021
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
6ec031b2 by Samuel Thibault at 2021-09-05T01:50:18+02:00
slirp_socketpair_with_oob: Connect pair through 127.0.0.1
We do not need the socket to be exposed outside the localhost, and this
reduces the attack surface.
Suggested-by: Akihiro Suda <suda.kyoto at gmail.com>
- - - - -
1 changed file:
- src/misc.c
Changes:
=====================================
src/misc.c
=====================================
@@ -82,7 +82,7 @@ static int slirp_socketpair_with_oob(int sv[2])
struct sockaddr_in addr = {
.sin_family = AF_INET,
.sin_port = 0,
- .sin_addr.s_addr = INADDR_ANY,
+ .sin_addr.s_addr = htonl(INADDR_LOOPBACK),
};
socklen_t addrlen = sizeof(addr);
int ret, s;
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/6ec031b297b3f9bebd692511492367b4f14e50b4
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/commit/6ec031b297b3f9bebd692511492367b4f14e50b4
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/20210904/b0dc01ff/attachment.htm>
More information about the Slirp
mailing list