@@ -198,8 +198,7 @@ where
198
198
let len = q ( send_buf. as_mut ( ) ) ?;
199
199
200
200
if len > 0 {
201
- self . broadcast_once ( send, & send_buf. as_mut ( ) [ ..len] , true , true )
202
- . await ?;
201
+ self . broadcast_once ( send, & send_buf. as_mut ( ) [ ..len] ) . await ?;
203
202
}
204
203
205
204
Ok ( ( ) )
@@ -235,7 +234,7 @@ where
235
234
self . delay ( ) . await ;
236
235
}
237
236
238
- self . broadcast_once ( send, data, true , true ) . await ?;
237
+ self . broadcast_once ( send, data) . await ?;
239
238
}
240
239
}
241
240
@@ -304,28 +303,16 @@ where
304
303
305
304
info ! ( "Replying to mDNS query from {remote}" ) ;
306
305
307
- self . broadcast_once (
308
- send,
309
- data,
310
- matches ! ( remote, SocketAddr :: V4 ( _) ) ,
311
- matches ! ( remote, SocketAddr :: V6 ( _) ) ,
312
- )
313
- . await ?;
306
+ self . broadcast_once ( send, data) . await ?;
314
307
}
315
308
}
316
309
}
317
310
}
318
311
319
- async fn broadcast_once (
320
- & self ,
321
- send : & mut S ,
322
- data : & [ u8 ] ,
323
- ipv4 : bool ,
324
- ipv6 : bool ,
325
- ) -> Result < ( ) , MdnsIoError < S :: Error > > {
312
+ async fn broadcast_once ( & self , send : & mut S , data : & [ u8 ] ) -> Result < ( ) , MdnsIoError < S :: Error > > {
326
313
for remote_addr in
327
314
core:: iter:: once ( SocketAddr :: V4 ( SocketAddrV4 :: new ( IP_BROADCAST_ADDR , PORT ) ) )
328
- . filter ( |_| ipv4 && self . ipv4_interface . is_some ( ) )
315
+ . filter ( |_| self . ipv4_interface . is_some ( ) )
329
316
. chain (
330
317
self . ipv6_interface
331
318
. map ( |interface| {
@@ -336,8 +323,7 @@ where
336
323
interface,
337
324
) )
338
325
} )
339
- . into_iter ( )
340
- . filter ( |_| ipv6) ,
326
+ . into_iter ( ) ,
341
327
)
342
328
{
343
329
if !data. is_empty ( ) {
0 commit comments