Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
1aa6f707
Unverified
Commit
1aa6f707
authored
Feb 01, 2019
by
Luca Boccassi
Committed by
GitHub
Feb 01, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3377 from sigiesec/fix-3376
Fix handling of random port numbers with tipc
parents
19b64709
ae79b41d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
9 deletions
+4
-9
tipc_address.cpp
src/tipc_address.cpp
+0
-4
tipc_address.hpp
src/tipc_address.hpp
+0
-4
tipc_listener.cpp
src/tipc_listener.cpp
+1
-1
test_address_tipc.cpp
tests/test_address_tipc.cpp
+3
-0
No files found.
src/tipc_address.cpp
View file @
1aa6f707
...
...
@@ -55,10 +55,6 @@ zmq::tipc_address_t::tipc_address_t (const sockaddr *sa, socklen_t sa_len)
_random
=
false
;
}
zmq
::
tipc_address_t
::~
tipc_address_t
()
{
}
void
zmq
::
tipc_address_t
::
set_random
()
{
_random
=
true
;
...
...
src/tipc_address.hpp
View file @
1aa6f707
...
...
@@ -50,7 +50,6 @@ class tipc_address_t
public
:
tipc_address_t
();
tipc_address_t
(
const
sockaddr
*
sa
,
socklen_t
sa_len
);
~
tipc_address_t
();
// This function sets up the address "{type, lower, upper}" for TIPC transport
int
resolve
(
const
char
*
name
);
...
...
@@ -69,9 +68,6 @@ class tipc_address_t
private
:
bool
_random
;
struct
sockaddr_tipc
address
;
tipc_address_t
(
const
tipc_address_t
&
);
const
tipc_address_t
&
operator
=
(
const
tipc_address_t
&
);
};
}
...
...
src/tipc_listener.cpp
View file @
1aa6f707
...
...
@@ -166,7 +166,7 @@ int zmq::tipc_listener_t::set_address (const char *addr_)
if
(
rc
!=
0
)
goto
error
;
tipc_address_t
addr
((
struct
sockaddr
*
)
&
ss
,
sl
);
address
=
tipc_address_t
((
struct
sockaddr
*
)
&
ss
,
sl
);
}
...
...
tests/test_address_tipc.cpp
View file @
1aa6f707
...
...
@@ -91,6 +91,9 @@ void test_tipc_port_identity ()
rc
=
sscanf
(
&
endpoint
[
0
],
"tipc://<%u.%u.%u:%u>"
,
&
z
,
&
c
,
&
n
,
&
ref
);
TEST_ASSERT_EQUAL_INT
(
4
,
rc
);
TEST_ASSERT_NOT_EQUAL_MESSAGE
(
0
,
ref
,
"tipc port number must not be 0 after random assignment"
);
rc
=
zmq_connect
(
sc
,
endpoint
);
TEST_ASSERT_EQUAL_INT
(
0
,
rc
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment