mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-15 18:35:47 +00:00
forward original peer info in ospf route (#589)
prost doesn't support unknown field, and these info may be lost when they go through a old version node.
This commit is contained in:
@@ -192,7 +192,7 @@ impl Client {
|
||||
|
||||
async fn call(
|
||||
&self,
|
||||
ctrl: Self::Controller,
|
||||
mut ctrl: Self::Controller,
|
||||
method: <Self::Descriptor as ServiceDescriptor>::Method,
|
||||
input: bytes::Bytes,
|
||||
) -> Result<bytes::Bytes> {
|
||||
@@ -224,7 +224,11 @@ impl Client {
|
||||
};
|
||||
|
||||
let rpc_req = RpcRequest {
|
||||
request: input.into(),
|
||||
request: if let Some(raw_input) = ctrl.get_raw_input() {
|
||||
raw_input.into()
|
||||
} else {
|
||||
input.into()
|
||||
},
|
||||
timeout_ms: ctrl.timeout_ms(),
|
||||
..Default::default()
|
||||
};
|
||||
@@ -280,7 +284,10 @@ impl Client {
|
||||
return Err(err.into());
|
||||
}
|
||||
|
||||
Ok(bytes::Bytes::from(rpc_resp.response))
|
||||
let raw_output = Bytes::from(rpc_resp.response.clone());
|
||||
ctrl.set_raw_output(raw_output.clone());
|
||||
|
||||
Ok(raw_output)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user