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 1
1
# webrtc-ice changelog
2
2
3
3
## 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 ) .
5
6
6
7
## v0.8.1
7
8
Original file line number Diff line number Diff line change @@ -118,17 +118,13 @@ pub async fn local_interfaces(
118
118
119
119
if !ipaddr. is_loopback ( )
120
120
&& ( ( ipv4requested && ipaddr. is_ipv4 ( ) ) || ( ipv6requested && ipaddr. is_ipv6 ( ) ) )
121
+ && ip_filter
122
+ . as_ref ( )
123
+ . map ( |filter| filter ( ipaddr) )
124
+ . unwrap_or ( true )
121
125
{
122
- continue ;
123
- }
124
-
125
- if let Some ( filter) = ip_filter {
126
- if !filter ( ipaddr) {
127
- continue ;
128
- }
126
+ ips. insert ( ipaddr) ;
129
127
}
130
-
131
- ips. insert ( ipaddr) ;
132
128
}
133
129
}
134
130
You can’t perform that action at this time.
0 commit comments