Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergi
Tor
Commits
99947c3c
Commit
99947c3c
authored
6 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'teor/bug29015'
parents
cef91064
671c34d9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/net/socket.c
+3
-1
3 additions, 1 deletion
src/lib/net/socket.c
src/lib/net/socketpair.c
+6
-1
6 additions, 1 deletion
src/lib/net/socketpair.c
with
9 additions
and
2 deletions
src/lib/net/socket.c
+
3
−
1
View file @
99947c3c
...
...
@@ -458,7 +458,9 @@ get_n_open_sockets(void)
* localhost is inaccessible (for example, if the networking
* stack is down). And even if it succeeds, the socket pair will not
* be able to read while localhost is down later (the socket pair may
* even close, depending on OS-specific timeouts).
* even close, depending on OS-specific timeouts). The socket pair
* should work on IPv4-only, IPv6-only, and dual-stack systems, as long
* as they have the standard localhost addresses.
*
* Returns 0 on success and -errno on failure; do not rely on the value
* of errno or WSAGetLastError().
...
...
This diff is collapsed.
Click to expand it.
src/lib/net/socketpair.c
+
6
−
1
View file @
99947c3c
...
...
@@ -105,7 +105,12 @@ sockaddr_eq(struct sockaddr *sa1, struct sockaddr *sa2)
/**
* Helper used to implement socketpair on systems that lack it, by
* making a direct connection to localhost.
*/
*
* See tor_socketpair() for details.
*
* The direct connection defaults to IPv4, but falls back to IPv6 if
* IPv4 is not supported.
**/
int
tor_ersatz_socketpair
(
int
family
,
int
type
,
int
protocol
,
tor_socket_t
fd
[
2
])
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment