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
549fe716
Commit
549fe716
authored
May 01, 2008
by
Olivier Crête
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit 'kakaroto/nice-kakaroto' into nice-tester-2
parents
a0d688d3
e60ef6a5
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
18 deletions
+22
-18
agent/conncheck.c
agent/conncheck.c
+1
-1
agent/test-thread.c
agent/test-thread.c
+2
-2
stun/bind.c
stun/bind.c
+11
-9
stun/conncheck.h
stun/conncheck.h
+1
-1
stun/stun-ice.c
stun/stun-ice.c
+4
-2
stun/stun-ice.h
stun/stun-ice.h
+1
-1
stun/stunrecv.c
stun/stunrecv.c
+2
-2
No files found.
agent/conncheck.c
View file @
549fe716
...
...
@@ -1058,7 +1058,7 @@ int conn_check_send (NiceAgent *agent, CandidateCheckPair *pair)
&
sockaddr
,
sizeof
(
sockaddr
),
uname
,
password
,
cand_use
,
controlling
,
priority
,
agent
->
tie_breaker
);
agent
->
tie_breaker
,
agent
->
compatibility
);
timeout
=
stun_bind_timeout
(
pair
->
stun_ctx
);
/* note: convert from milli to microseconds for g_time_val_add() */
...
...
agent/test-thread.c
View file @
549fe716
...
...
@@ -201,8 +201,8 @@ int main (void)
nice_udp_bsd_socket_factory_init
(
&
udpfactory
);
/* step: create the agents L and R */
lagent
=
nice_agent_new
(
&
udpfactory
,
lmainctx
,
NICE_COMPATIBILITY_
ID19
);
ragent
=
nice_agent_new
(
&
udpfactory
,
rmainctx
,
NICE_COMPATIBILITY_
ID19
);
lagent
=
nice_agent_new
(
&
udpfactory
,
lmainctx
,
NICE_COMPATIBILITY_
GOOGLE
);
ragent
=
nice_agent_new
(
&
udpfactory
,
rmainctx
,
NICE_COMPATIBILITY_
GOOGLE
);
g_object_set_data
(
G_OBJECT
(
lagent
),
"other-agent"
,
ragent
);
g_object_set_data
(
G_OBJECT
(
ragent
),
"other-agent"
,
lagent
);
...
...
stun/bind.c
View file @
549fe716
...
...
@@ -262,7 +262,7 @@ stun_conncheck_start (stun_bind_t **restrict context, int fd,
const
struct
sockaddr
*
restrict
srv
,
socklen_t
srvlen
,
const
char
*
username
,
const
char
*
password
,
bool
cand_use
,
bool
controlling
,
uint32_t
priority
,
uint64_t
tie
)
uint64_t
tie
,
uint32_t
compat
)
{
int
val
;
stun_bind_t
*
ctx
;
...
...
@@ -275,6 +275,7 @@ stun_conncheck_start (stun_bind_t **restrict context, int fd,
return
val
;
ctx
=
*
context
;
if
(
compat
!=
1
)
{
ctx
->
trans
.
key
.
length
=
strlen
(
password
);
ctx
->
trans
.
key
.
value
=
malloc
(
ctx
->
trans
.
key
.
length
);
if
(
ctx
->
trans
.
key
.
value
==
NULL
)
...
...
@@ -284,6 +285,7 @@ stun_conncheck_start (stun_bind_t **restrict context, int fd,
}
memcpy
(
ctx
->
trans
.
key
.
value
,
password
,
ctx
->
trans
.
key
.
length
);
}
if
(
cand_use
)
{
...
...
stun/conncheck.h
View file @
549fe716
...
...
@@ -71,7 +71,7 @@ int stun_conncheck_start (stun_bind_t **restrict context, int fd,
const
struct
sockaddr
*
restrict
srv
,
socklen_t
srvlen
,
const
char
*
username
,
const
char
*
password
,
bool
cand_use
,
bool
controlling
,
uint32_t
priority
,
uint64_t
tie
);
uint64_t
tie
,
uint32_t
compat
);
/**
* Tries to parse a STUN connectivity check (Binding request) and format a
...
...
stun/stun-ice.c
View file @
549fe716
...
...
@@ -119,10 +119,12 @@ stun_conncheck_reply (uint8_t *restrict buf, size_t *restrict plen,
return
EPROTO
;
}
DBG
(
"compat = %d - username %d - pass %d
\n
"
,
compat
,
stun_present
(
msg
,
STUN_USERNAME
),
stun_present
(
msg
,
STUN_MESSAGE_INTEGRITY
));
/* Short term credentials checking */
val
=
0
;
if
(
!
stun_present
(
msg
,
STUN_
MESSAGE_INTEGRITY
)
||
(
compat
!=
1
&&
!
stun_present
(
msg
,
STUN_
USERNAME
)))
if
(
!
stun_present
(
msg
,
STUN_
USERNAME
)
||
(
compat
!=
1
&&
!
stun_present
(
msg
,
STUN_
MESSAGE_INTEGRITY
)))
{
DBG
(
" Missing USERNAME or MESSAGE-INTEGRITY.
\n
"
);
val
=
STUN_BAD_REQUEST
;
...
...
stun/stun-ice.h
View file @
549fe716
...
...
@@ -71,7 +71,7 @@ int stun_conncheck_start (stun_bind_t **restrict context, int fd,
const
struct
sockaddr
*
restrict
srv
,
socklen_t
srvlen
,
const
char
*
username
,
const
char
*
password
,
bool
cand_use
,
bool
controlling
,
uint32_t
priority
,
uint64_t
tie
);
uint64_t
tie
,
uint32_t
compat
);
/**
* Tries to parse a STUN connectivity check (Binding request) and format a
...
...
stun/stunrecv.c
View file @
549fe716
...
...
@@ -601,12 +601,12 @@ stun_match_answer (const uint8_t *msg, stun_method_t method,
* currently ignore them. */
if
(
stun_verify_key
(
msg
,
key
,
keylen
)
!=
0
)
return
false
;
}
}
/*
else
{
if (stun_present (msg, STUN_MESSAGE_INTEGRITY))
return false;
}
}*/
return
true
;
}
...
...
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