From 7fac1c8234127c2f3e7cb6e0b14be2c5da07951c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1aki=20Baz=20Castillo?= Date: Tue, 2 Jan 2024 20:23:45 +0100 Subject: [PATCH] Make keys required --- rust/src/data_structures.rs | 4 ++-- rust/tests/integration/plain_transport.rs | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/rust/src/data_structures.rs b/rust/src/data_structures.rs index 0e22c9311f..07fb5247af 100644 --- a/rust/src/data_structures.rs +++ b/rust/src/data_structures.rs @@ -98,11 +98,11 @@ impl ListenInfo { pub struct SocketFlags { /// Disable dual-stack support so only IPv6 is used (only if ip is IPv6). /// Defaults to false. - pub ipv6_only: Option, + pub ipv6_only: bool, /// Make different transports bind to the same ip and port (only for UDP). /// Useful for multicast scenarios with plain transport. Use with caution. /// Defaults to false. - pub udp_reuse_port: Option, + pub udp_reuse_port: bool, } impl SocketFlags { diff --git a/rust/tests/integration/plain_transport.rs b/rust/tests/integration/plain_transport.rs index 9567e6dc69..c132724b81 100644 --- a/rust/tests/integration/plain_transport.rs +++ b/rust/tests/integration/plain_transport.rs @@ -440,6 +440,7 @@ fn create_two_transports_binding_to_same_ip_port_with_udp_reuse_port_flag_succee announced_ip: None, port: Some(port), flags: Some(SocketFlags { + ipv6_only: false, udp_reuse_port: true, }), send_buffer_size: None, @@ -458,6 +459,7 @@ fn create_two_transports_binding_to_same_ip_port_with_udp_reuse_port_flag_succee announced_ip: None, port: Some(port), flags: Some(SocketFlags { + ipv6_only: false, udp_reuse_port: true, }), send_buffer_size: None, @@ -487,6 +489,7 @@ fn create_two_transports_binding_to_same_ip_port_without_udp_reuse_port_flag_fai announced_ip: None, port: Some(port), flags: Some(SocketFlags { + ipv6_only: false, udp_reuse_port: false, }), send_buffer_size: None, @@ -505,6 +508,7 @@ fn create_two_transports_binding_to_same_ip_port_without_udp_reuse_port_flag_fai announced_ip: None, port: Some(port), flags: Some(SocketFlags { + ipv6_only: false, udp_reuse_port: false, }), send_buffer_size: None,