mgcp_network: do not log destination invalid ip/port as error
It is legal to create connection without setting the destination ip and port (this usually done later through MDCX). However, if some other connection tries to deliver an RTP packet through a a half open connection, then the fact that no destination ip is set is logged as error even if it is a pretty normal situation. - Check if destination ip and port are set to zero. If yes, we assume that the destination connection details are intentionally not set yet. Only when one value is set and the other one not, we log an error. Otherweise we log a message to debug. Change-Id: If96e5a60b8ab92259d3bddaa143121893bb6c525 Related OS#3104
This commit is contained in:
parent
54eb0e1204
commit
e6df0e47e7
|
@ -867,6 +867,15 @@ static int check_rtp_destin(struct mgcp_conn_rtp *conn)
|
|||
struct mgcp_endpoint *endp;
|
||||
endp = conn->conn->endp;
|
||||
|
||||
/* Note: it is legal to create a connection but never setting a port
|
||||
* and IP-address for outgoing data. */
|
||||
if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0 && conn->end.rtp_port == 0) {
|
||||
LOGP(DRTP, LOGL_DEBUG,
|
||||
"endpoint:0x%x destination IP-address and rtp port is (not yet) known\n",
|
||||
ENDPOINT_NUMBER(endp));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) {
|
||||
LOGP(DRTP, LOGL_ERROR,
|
||||
"endpoint:0x%x destination IP-address is invalid\n",
|
||||
|
|
Loading…
Reference in New Issue