Skip to content

Commit 64ff191

Browse files
committed
Hook up id tryfrom
1 parent 366dec6 commit 64ff191

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

quinn-proto/src/transport_parameters.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ macro_rules! make_struct {
117117
/// The role of this peer in address discovery, if any.
118118
pub(crate) address_discovery_role: address_discovery::Role,
119119

120-
// Multipath extension
120+
/// Multipath extension
121121
pub(crate) initial_max_path_id: Option<PathId>,
122122

123123
/// Nat traversal draft
@@ -802,6 +802,7 @@ impl TryFrom<u64> for TransportParameterId {
802802
id if Self::MinAckDelayDraft07 == id => Self::MinAckDelayDraft07,
803803
id if Self::ObservedAddr == id => Self::ObservedAddr,
804804
id if Self::InitialMaxPathId == id => Self::InitialMaxPathId,
805+
id if Self::IrohNatTraversal == id => Self::IrohNatTraversal,
805806
_ => return Err(()),
806807
};
807808
Ok(param)
@@ -842,6 +843,7 @@ mod test {
842843
min_ack_delay: Some(2_000u32.into()),
843844
address_discovery_role: address_discovery::Role::SendOnly,
844845
initial_max_path_id: Some(PathId::MAX),
846+
max_remote_nat_traversal_addresses: Some(5u8.try_into().unwrap()),
845847
..TransportParameters::default()
846848
};
847849
params.write(&mut buf);

0 commit comments

Comments
 (0)