gprs_ns: Allow to set the DSCP for the UDP socket.
Allow to tag the NS service with a custom DSCP.
diff --git a/src/gb/gprs_ns.c b/src/gb/gprs_ns.c
index cdcf36e..ef937d9 100644
--- a/src/gb/gprs_ns.c
+++ b/src/gb/gprs_ns.c
@@ -1051,6 +1051,13 @@
if (ret < 0)
return ret;
+ ret = setsockopt(nsi->nsip.fd.fd, IPPROTO_IP, IP_TOS,
+ &nsi->nsip.dscp, sizeof(nsi->nsip.dscp));
+ if (ret < 0)
+ LOGP(DNS, LOGL_ERROR,
+ "Failed to set the DSCP to %d with ret(%d) errno(%d)\n",
+ nsi->nsip.dscp, ret, errno);
+
return ret;
}