[Asterisk-code-review] chan_sip: DiffServ/ToS not only on UDP but also on TCP and TLS sockets. (asterisk[master])

Alexander Traud asteriskteam at digium.com
Wed Apr 15 01:23:37 CDT 2020


Alexander Traud has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/14211 )


Change subject: chan_sip: DiffServ/ToS not only on UDP but also on TCP and TLS sockets.
......................................................................

chan_sip: DiffServ/ToS not only on UDP but also on TCP and TLS sockets.

ASTERISK-27195
Reported by: Joshua Roys

Change-Id: I6e72ecb874200dec7a3865c7babaf5ac0d3101de
---
M channels/chan_sip.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/11/14211/1

diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 078cf10..9bc282b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -29696,6 +29696,8 @@
 		goto create_tcptls_session_fail;
 	}
 
+	ast_set_qos(s->fd, global_tos_sip, global_cos_sip, "SIP");
+
 	return s->fd;
 
 create_tcptls_session_fail:
@@ -33510,6 +33512,7 @@
 			if (setsockopt(sip_tcp_desc.accept_fd, SOL_SOCKET, SO_KEEPALIVE, &flags, sizeof(flags))) {
 				ast_log(LOG_ERROR, "Error enabling TCP keep-alive on sip socket: %s\n", strerror(errno));
 			}
+			ast_set_qos(sip_tcp_desc.accept_fd, global_tos_sip, global_cos_sip, "SIP");
 		}
 	}
 
@@ -33537,6 +33540,7 @@
 				ast_log(LOG_ERROR, "Error enabling TCP keep-alive on sip socket: %s\n", strerror(errno));
 				sip_tls_desc.tls_cfg = NULL;
 			}
+			ast_set_qos(sip_tls_desc.accept_fd, global_tos_sip, global_cos_sip, "SIP");
 		}
 	} else if (sip_tls_desc.tls_cfg->enabled) {
 		sip_tls_desc.tls_cfg = NULL;

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14211
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I6e72ecb874200dec7a3865c7babaf5ac0d3101de
Gerrit-Change-Number: 14211
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200415/496fb27e/attachment.html>


More information about the asterisk-code-review mailing list