File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 11# webrtc-ice changelog
22
33## Unreleased
4- * Add IP filter to ICE ` AgentConfig ` [ #306 ] ( https://github.com/webrtc-rs/webrtc/pull/306 )
4+
5+ * Add IP filter to ICE ` AgentConfig ` [ #306 ] ( https://github.com/webrtc-rs/webrtc/pull/306 ) and [ #318 ] ( https://github.com/webrtc-rs/webrtc/pull/318 ) .
56
67## v0.8.1
78
Original file line number Diff line number Diff line change @@ -118,17 +118,13 @@ pub async fn local_interfaces(
118118
119119 if !ipaddr. is_loopback ( )
120120 && ( ( ipv4requested && ipaddr. is_ipv4 ( ) ) || ( ipv6requested && ipaddr. is_ipv6 ( ) ) )
121+ && ip_filter
122+ . as_ref ( )
123+ . map ( |filter| filter ( ipaddr) )
124+ . unwrap_or ( true )
121125 {
122- continue ;
123- }
124-
125- if let Some ( filter) = ip_filter {
126- if !filter ( ipaddr) {
127- continue ;
128- }
126+ ips. insert ( ipaddr) ;
129127 }
130-
131- ips. insert ( ipaddr) ;
132128 }
133129 }
134130
You can’t perform that action at this time.
0 commit comments