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,