Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
freediameter
Commits
0390e984
Commit
0390e984
authored
Feb 22, 2011
by
Sebastien Decugis
Browse files
Fix a small bug in peers validation process
parent
e40d4a7c
Changes
2
Hide whitespace changes
Inline
Side-by-side
libfdcore/p_ce.c
View file @
0390e984
...
...
@@ -819,6 +819,11 @@ int fd_p_ce_process_receiver(struct fd_peer * peer)
}
}
/* Save the credentials if handshake already occurred */
if
(
fd_cnx_getTLS
(
peer
->
p_cnxctx
)
)
{
CHECK_FCT
(
fd_cnx_getcred
(
peer
->
p_cnxctx
,
&
peer
->
p_hdr
.
info
.
runtime
.
pir_cert_list
,
&
peer
->
p_hdr
.
info
.
runtime
.
pir_cert_list_size
)
);
}
/* Validate the peer if needed */
if
(
peer
->
p_flags
.
pf_responder
)
{
int
res
=
fd_peer_validate
(
peer
);
...
...
libfdcore/peers.c
View file @
0390e984
...
...
@@ -456,7 +456,7 @@ int fd_peer_handle_newCER( struct msg ** cer, struct cnxctx ** cnx )
/* First, check if the Origin-Host value */
if
(
!
fd_os_is_valid_DiameterIdentity
(
avp_hdr
->
avp_value
->
os
.
data
,
avp_hdr
->
avp_value
->
os
.
len
))
{
TRACE_DEBUG
(
INFO
,
"Received new CER with invalid
\\
0 in its
Origin-Host"
);
TRACE_DEBUG
(
INFO
,
"Received new CER with invalid Origin-Host"
);
CHECK_FCT
(
fd_msg_new_answer_from_req
(
fd_g_config
->
cnf_dict
,
cer
,
MSGFL_ANSW_ERROR
)
);
CHECK_FCT
(
fd_msg_rescode_set
(
*
cer
,
"ER_DIAMETER_INVALID_AVP_VALUE"
,
"Your Origin-Host contains invalid characters."
,
avp_oh
,
1
)
);
...
...
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