Selaa lähdekoodia

[undi] Ask for promiscuous packet reception when using UNDI driver

We never set up specific multicast filters; native drivers will ask
the card to receive all multicast packets.  The only way to achieve
this via the UNDI API is to enable promiscuous mode.
tags/v0.9.4
Michael Brown 17 vuotta sitten
vanhempi
commit
798ddf884f
1 muutettua tiedostoa jossa 6 lisäystä ja 2 poistoa
  1. 6
    2
      src/arch/i386/drivers/net/undinet.c

+ 6
- 2
src/arch/i386/drivers/net/undinet.c Näytä tiedosto

543
 	undinet_call ( undinic, PXENV_UNDI_SET_STATION_ADDRESS,
543
 	undinet_call ( undinic, PXENV_UNDI_SET_STATION_ADDRESS,
544
 		       &undi_set_address, sizeof ( undi_set_address ) );
544
 		       &undi_set_address, sizeof ( undi_set_address ) );
545
 
545
 
546
-	/* Open NIC */
546
+	/* Open NIC.  We ask for promiscuous operation, since it's the
547
+	 * only way to ask for all multicast addresses.  On any
548
+	 * switched network, it shouldn't really make a difference to
549
+	 * performance.
550
+	 */
547
 	memset ( &undi_open, 0, sizeof ( undi_open ) );
551
 	memset ( &undi_open, 0, sizeof ( undi_open ) );
548
-	undi_open.PktFilter = ( FLTR_DIRECTED | FLTR_BRDCST );
552
+	undi_open.PktFilter = ( FLTR_DIRECTED | FLTR_BRDCST | FLTR_PRMSCS );
549
 	if ( ( rc = undinet_call ( undinic, PXENV_UNDI_OPEN, &undi_open,
553
 	if ( ( rc = undinet_call ( undinic, PXENV_UNDI_OPEN, &undi_open,
550
 				   sizeof ( undi_open ) ) ) != 0 )
554
 				   sizeof ( undi_open ) ) ) != 0 )
551
 		goto err;
555
 		goto err;

Loading…
Peruuta
Tallenna