Mercurial > hg > freeDiameter
comparison libfdcore/p_psm.c @ 1186:56c36d1007b4
Further preparation of the DTLS integration. Some cleanups in the GNUTLS handling.
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Fri, 07 Jun 2013 18:48:34 +0800 |
parents | 22de21feec64 |
children | 8c4dd4b693c6 |
comparison
equal
deleted
inserted
replaced
1185:23695957bfc0 | 1186:56c36d1007b4 |
---|---|
69 (7) [r] Upon reception of the DWA, move to OPEN state, messages can be | 69 (7) [r] Upon reception of the DWA, move to OPEN state, messages can be |
70 sent unordered from this point. | 70 sent unordered from this point. |
71 | 71 |
72 Note about (5) and (6): if the Diameter Identity received in CER or CEA | 72 Note about (5) and (6): if the Diameter Identity received in CER or CEA |
73 does not match the credentials from the certificate presented during | 73 does not match the credentials from the certificate presented during |
74 DTLS handshake, we may need to specify a path of clean disconnection | 74 TLS handshake, we may need to specify a path of clean disconnection |
75 (not blocking the remote peer waiting for something). | 75 (not blocking the remote peer waiting for something). |
76 | 76 |
77 This proposed mechanism removes the problem of application messages | 77 This proposed mechanism removes the problem of application messages |
78 received before the CEA by the initiator. Note that if the "old" inband | 78 received before the CEA by the initiator. Note that if the "old" inband |
79 TLS handshake is used, this handshake plays the same synchronization | 79 TLS handshake is used, this handshake plays the same synchronization |
598 goto psm_end; | 598 goto psm_end; |
599 } ); | 599 } ); |
600 } else { | 600 } else { |
601 if (msg == NULL) { | 601 if (msg == NULL) { |
602 /* Send the error back to the peer */ | 602 /* Send the error back to the peer */ |
603 CHECK_FCT_DO( ret = fd_out_send(&error, NULL, peer, FD_CNX_ORDERED), ); | 603 CHECK_FCT_DO( ret = fd_out_send(&error, NULL, peer), ); |
604 if (error) { | 604 if (error) { |
605 char buf[256]; | 605 char buf[256]; |
606 /* Only if an error occurred & the message was not saved / dumped */ | 606 /* Only if an error occurred & the message was not saved / dumped */ |
607 snprintf(buf, sizeof(buf), "%s: error sending a message", peer->p_hdr.info.pi_diamid); | 607 snprintf(buf, sizeof(buf), "%s: error sending a message", peer->p_hdr.info.pi_diamid); |
608 fd_hook_call(HOOK_MESSAGE_DROPPED, error, peer, buf, fd_msg_pmdl_get(error)); | 608 fd_hook_call(HOOK_MESSAGE_DROPPED, error, peer, buf, fd_msg_pmdl_get(error)); |
652 | 652 |
653 /* Set the error code */ | 653 /* Set the error code */ |
654 CHECK_FCT_DO( fd_msg_rescode_set(msg, "DIAMETER_COMMAND_UNSUPPORTED", "Or maybe the P-bit or application Id are erroneous.", NULL, 1 ), break ); | 654 CHECK_FCT_DO( fd_msg_rescode_set(msg, "DIAMETER_COMMAND_UNSUPPORTED", "Or maybe the P-bit or application Id are erroneous.", NULL, 1 ), break ); |
655 | 655 |
656 /* Send the answer */ | 656 /* Send the answer */ |
657 CHECK_FCT_DO( fd_out_send(&msg, peer->p_cnxctx, peer, FD_CNX_ORDERED), break ); | 657 CHECK_FCT_DO( fd_out_send(&msg, peer->p_cnxctx, peer), break ); |
658 } while (0); | 658 } while (0); |
659 } else { | 659 } else { |
660 /* We did ASK for it ??? */ | 660 /* We did ASK for it ??? */ |
661 TRACE_DEBUG(INFO, "Received answer with erroneous 'is_routable' result..."); | 661 TRACE_DEBUG(INFO, "Received answer with erroneous 'is_routable' result..."); |
662 } | 662 } |