ns2: Fix setting the DSCP value.
DSCP is a 6-bit value (0..63) stored in the upper 6 bits of what was
formerly known as TOS bits. We must
* make sure the user can only specify 0..63
* shift the value by two bits when using the IP_TOS socket option
We achieve the latter by using the recently-added osmo_sock_set_dscp()
helper.
Change-Id: I64fee56b04d0ecd128bf661699d5071817ea96ec
Closes: OS#5136
diff --git a/src/gb/gprs_ns2_vty.c b/src/gb/gprs_ns2_vty.c
index 1ef22f5..c390423 100644
--- a/src/gb/gprs_ns2_vty.c
+++ b/src/gb/gprs_ns2_vty.c
@@ -679,7 +679,7 @@
}
DEFUN(cfg_ns_bind_dscp, cfg_ns_bind_dscp_cmd,
- "dscp <0-255>",
+ "dscp <0-63>",
"Set DSCP/TOS on the UDP socket\n" "DSCP Value\n")
{
struct vty_bind *vbind = vty->index;