feat(session): restrict DSCP negotiation to allow only disabling (reset to 0)
This commit is contained in:
1 file changed
+6
-1
@@ -273,7 +273,12 @@ pub(crate) fn negotiate_params(
|
|||||||
},
|
},
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
if returned.dscp != requested.dscp {
|
if returned.dscp != requested.dscp && returned.dscp != 0 {
|
||||||
|
return Err(ClientError::NegotiationRejected {
|
||||||
|
reason: "server returned unsupported DSCP change".to_owned(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if returned.dscp == 0 && requested.dscp != 0 {
|
||||||
record_restriction(
|
record_restriction(
|
||||||
policy,
|
policy,
|
||||||
&mut restrictions,
|
&mut restrictions,
|
||||||
|
|||||||
Reference in new issue
Block a user