Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
libnice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
libnice
Commits
7d187257
Commit
7d187257
authored
Aug 03, 2008
by
Youness Alaoui
Committed by
Youness Alaoui
Aug 04, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Peer reflexive candidates should hold the same user/pass as their base candidate
parent
5785da2c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
8 deletions
+16
-8
agent/conncheck.c
agent/conncheck.c
+7
-5
agent/discovery.c
agent/discovery.c
+7
-2
agent/discovery.h
agent/discovery.h
+2
-1
No files found.
agent/conncheck.c
View file @
7d187257
...
@@ -1488,7 +1488,7 @@ static void priv_check_for_role_conflict (NiceAgent *agent, gboolean control)
...
@@ -1488,7 +1488,7 @@ static void priv_check_for_role_conflict (NiceAgent *agent, gboolean control)
*
*
* @return pointer to a new pair if one was created, otherwise NULL
* @return pointer to a new pair if one was created, otherwise NULL
*/
*/
static
CandidateCheckPair
*
priv_process_response_check_for_peer_reflexive
(
NiceAgent
*
agent
,
Stream
*
stream
,
Component
*
component
,
CandidateCheckPair
*
p
,
NiceUDPSocket
*
sockptr
,
struct
sockaddr
*
mapped_sockaddr
)
static
CandidateCheckPair
*
priv_process_response_check_for_peer_reflexive
(
NiceAgent
*
agent
,
Stream
*
stream
,
Component
*
component
,
CandidateCheckPair
*
p
,
NiceUDPSocket
*
sockptr
,
struct
sockaddr
*
mapped_sockaddr
,
NiceCandidate
*
base_candidate
)
{
{
CandidateCheckPair
*
new_pair
=
NULL
;
CandidateCheckPair
*
new_pair
=
NULL
;
NiceAddress
mapped
;
NiceAddress
mapped
;
...
@@ -1518,7 +1518,8 @@ static CandidateCheckPair *priv_process_response_check_for_peer_reflexive(NiceAg
...
@@ -1518,7 +1518,8 @@ static CandidateCheckPair *priv_process_response_check_for_peer_reflexive(NiceAg
stream
->
id
,
stream
->
id
,
component
->
id
,
component
->
id
,
&
mapped
,
&
mapped
,
sockptr
);
sockptr
,
base_candidate
);
p
->
state
=
NICE_CHECK_FAILED
;
p
->
state
=
NICE_CHECK_FAILED
;
/* step: add a new discovered pair (see ICE 7.1.2.2.2
/* step: add a new discovered pair (see ICE 7.1.2.2.2
...
@@ -1537,7 +1538,7 @@ static CandidateCheckPair *priv_process_response_check_for_peer_reflexive(NiceAg
...
@@ -1537,7 +1538,7 @@ static CandidateCheckPair *priv_process_response_check_for_peer_reflexive(NiceAg
*
*
* @return TRUE if a matching transaction is found
* @return TRUE if a matching transaction is found
*/
*/
static
gboolean
priv_map_reply_to_conn_check_request
(
NiceAgent
*
agent
,
Stream
*
stream
,
Component
*
component
,
NiceUDPSocket
*
sockptr
,
const
NiceAddress
*
from
,
StunMessage
*
resp
)
static
gboolean
priv_map_reply_to_conn_check_request
(
NiceAgent
*
agent
,
Stream
*
stream
,
Component
*
component
,
NiceUDPSocket
*
sockptr
,
const
NiceAddress
*
from
,
NiceCandidate
*
base_candidate
,
StunMessage
*
resp
)
{
{
struct
sockaddr
sockaddr
;
struct
sockaddr
sockaddr
;
socklen_t
socklen
=
sizeof
(
sockaddr
);
socklen_t
socklen
=
sizeof
(
sockaddr
);
...
@@ -1593,7 +1594,8 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, Stream *
...
@@ -1593,7 +1594,8 @@ static gboolean priv_map_reply_to_conn_check_request (NiceAgent *agent, Stream *
* not match any local candidate, see 7.1.2.2.1
* not match any local candidate, see 7.1.2.2.1
* "Discovering Peer Reflexive Candidates" ICE ID-19) */
* "Discovering Peer Reflexive Candidates" ICE ID-19) */
ok_pair
=
priv_process_response_check_for_peer_reflexive
(
agent
,
stream
,
component
,
p
,
sockptr
,
&
sockaddr
);
ok_pair
=
priv_process_response_check_for_peer_reflexive
(
agent
,
stream
,
component
,
p
,
sockptr
,
&
sockaddr
,
base_candidate
);
if
(
!
ok_pair
)
if
(
!
ok_pair
)
ok_pair
=
p
;
ok_pair
=
p
;
...
@@ -1948,7 +1950,7 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
...
@@ -1948,7 +1950,7 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
/* step: let's try to match the response to an existing check context */
/* step: let's try to match the response to an existing check context */
if
(
trans_found
!=
TRUE
)
if
(
trans_found
!=
TRUE
)
trans_found
=
priv_map_reply_to_conn_check_request
(
agent
,
stream
,
trans_found
=
priv_map_reply_to_conn_check_request
(
agent
,
stream
,
component
,
udp_socket
,
from
,
&
req
);
component
,
udp_socket
,
from
,
local_candidate
,
&
req
);
/* step: let's try to match the response to an existing discovery */
/* step: let's try to match the response to an existing discovery */
if
(
trans_found
!=
TRUE
)
if
(
trans_found
!=
TRUE
)
...
...
agent/discovery.c
View file @
7d187257
...
@@ -386,7 +386,8 @@ discovery_add_peer_reflexive_candidate (
...
@@ -386,7 +386,8 @@ discovery_add_peer_reflexive_candidate (
guint
stream_id
,
guint
stream_id
,
guint
component_id
,
guint
component_id
,
NiceAddress
*
address
,
NiceAddress
*
address
,
NiceUDPSocket
*
base_socket
)
NiceUDPSocket
*
base_socket
,
NiceCandidate
*
base_candidate
)
{
{
NiceCandidate
*
candidate
;
NiceCandidate
*
candidate
;
Component
*
component
;
Component
*
component
;
...
@@ -413,7 +414,11 @@ discovery_add_peer_reflexive_candidate (
...
@@ -413,7 +414,11 @@ discovery_add_peer_reflexive_candidate (
candidate
->
addr
=
*
address
;
candidate
->
addr
=
*
address
;
candidate
->
base_addr
=
base_socket
->
addr
;
candidate
->
base_addr
=
base_socket
->
addr
;
priv_generate_msn_credentials
(
agent
,
candidate
);
if
(
base_candidate
->
username
)
candidate
->
username
=
g_strdup
(
base_candidate
->
username
);
if
(
base_candidate
->
password
)
candidate
->
password
=
g_strdup
(
base_candidate
->
password
);
priv_assign_foundation
(
agent
,
candidate
);
priv_assign_foundation
(
agent
,
candidate
);
/* step: link to the base candidate+socket */
/* step: link to the base candidate+socket */
...
...
agent/discovery.h
View file @
7d187257
...
@@ -89,7 +89,8 @@ discovery_add_peer_reflexive_candidate (
...
@@ -89,7 +89,8 @@ discovery_add_peer_reflexive_candidate (
guint
stream_id
,
guint
stream_id
,
guint
component_id
,
guint
component_id
,
NiceAddress
*
address
,
NiceAddress
*
address
,
NiceUDPSocket
*
base_socket
);
NiceUDPSocket
*
base_socket
,
NiceCandidate
*
base_candidate
);
NiceCandidate
*
NiceCandidate
*
discovery_learn_remote_peer_reflexive_candidate
(
discovery_learn_remote_peer_reflexive_candidate
(
...
...
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