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
dae09b56
Commit
dae09b56
authored
Aug 04, 2008
by
Youness Alaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean files a little
parent
2ecff0b2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
10 deletions
+14
-10
agent/conncheck.c
agent/conncheck.c
+13
-9
stun/usages/ice.c
stun/usages/ice.c
+1
-1
No files found.
agent/conncheck.c
View file @
dae09b56
...
...
@@ -1755,11 +1755,12 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
}
}
validater_data
=
g_new0
(
stun_validater_data
,
g_slist_length
(
component
->
local_candidates
)
+
1
);
validater_data
=
g_new0
(
stun_validater_data
,
g_slist_length
(
component
->
local_candidates
)
+
1
);
/* We have to check all the local candidates into our validater_data because a
server reflexive candidate shares the same socket as the host candidate,
so we
have no idea the user/pass is coming from which candidate */
server reflexive candidate shares the same socket as the host candidate,
so we
have no idea the user/pass is coming from which candidate */
j
=
0
;
for
(
i
=
component
->
local_candidates
;
i
;
i
=
i
->
next
)
{
NiceCandidate
*
cand
=
i
->
data
;
...
...
@@ -1780,8 +1781,9 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
}
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_MSN
)
{
validater_data
[
j
].
password
=
g_base64_decode
((
gchar
*
)
validater_data
[
j
].
password
,
&
validater_data
[
j
].
password_len
);
validater_data
[
j
].
password
=
g_base64_decode
((
gchar
*
)
validater_data
[
j
].
password
,
&
validater_data
[
j
].
password_len
);
}
j
++
;
}
...
...
@@ -1877,8 +1879,8 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
if
(
agent
->
compatibility
==
NICE_COMPATIBILITY_GOOGLE
&&
local_candidate
==
NULL
)
{
/* if we couldn't match the username and the stun agent has
IGNORE_CREDENTIALS,
then we have an integrity check failing */
/* if we couldn't match the username and the stun agent has
IGNORE_CREDENTIALS
then we have an integrity check failing */
g_debug
(
"Agent %p : Username check failed."
,
agent
);
if
(
stun_agent_init_error
(
&
agent
->
stun_agent
,
&
msg
,
rbuf
,
rbuf_len
,
&
req
,
STUN_ERROR_UNAUTHORIZED
))
{
...
...
@@ -1903,7 +1905,8 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
component
->
id
,
remote_candidate
,
local_candidate
,
uname
,
sizeof
(
uname
),
FALSE
);
memcpy
(
username
,
uname
,
username_len
);
req
.
key
=
g_base64_decode
((
gchar
*
)
remote_candidate
->
password
,
&
req
.
key_len
);
req
.
key
=
g_base64_decode
((
gchar
*
)
remote_candidate
->
password
,
&
req
.
key_len
);
}
rbuf_len
=
sizeof
(
rbuf
);
...
...
@@ -1975,7 +1978,8 @@ gboolean conn_check_handle_inbound_stun (NiceAgent *agent, Stream *stream,
trans_found
=
priv_map_reply_to_discovery_request
(
agent
,
&
req
);
if
(
trans_found
!=
TRUE
)
g_debug
(
"Agent %p : Unable to match to an existing transaction, probably a keepalive."
,
agent
);
g_debug
(
"Agent %p : Unable to match to an existing transaction, "
"probably a keepalive."
,
agent
);
}
return
TRUE
;
...
...
stun/usages/ice.c
View file @
dae09b56
...
...
@@ -82,7 +82,7 @@ stun_usage_ice_conncheck_create (StunAgent *agent, StunMessage *msg,
return
0
;
}
if
(
username
)
{
if
(
username
&&
username_len
>
0
)
{
val
=
stun_message_append_bytes
(
msg
,
STUN_ATTRIBUTE_USERNAME
,
username
,
username_len
);
if
(
val
)
...
...
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