jolly has uploaded this change for review.
Also apply DSCP settings on listening socket
The TOS values should be packets that are sent during handshake.
Therefore the DSCP setting must be applied to the listening socket also.
Related: SYS#8071
Change-Id: Ic70422ec73c753b61843444582f8665ca42e7a6d
---
M src/stream_srv.c
1 file changed, 12 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-netif refs/changes/10/42810/1
diff --git a/src/stream_srv.c b/src/stream_srv.c
index 6c4eada..3c8921e 100644
--- a/src/stream_srv.c
+++ b/src/stream_srv.c
@@ -614,6 +614,18 @@
if (ret < 0)
return ret;
+ if (link->ip_dscp > 0) {
+ int rc;
+ rc = osmo_sock_set_dscp(ret, link->ip_dscp);
+ if (rc < 0) {
+ LOGSLNK(link, LOGL_ERROR, "set_ip_dscp(%u): failed setsockopt err=%d\n",
+ link->ip_dscp, errno);
+ close(ret);
+ link->ofd.fd = -1;
+ return -EIO;
+ }
+ }
+
link->ofd.fd = ret;
if (osmo_fd_register(&link->ofd) < 0) {
close(ret);
To view, visit change 42810. To unsubscribe, or for help writing mail filters, visit settings.