Sfoglia il codice sorgente

Fix padding problem - from Michael

tags/v0.9.3
James Harper 18 anni fa
parent
commit
1c971f1234
1 ha cambiato i file con 1 aggiunte e 3 eliminazioni
  1. 1
    3
      src/drivers/net/legacy.c

+ 1
- 3
src/drivers/net/legacy.c Vedi File

@@ -27,9 +27,7 @@ static int legacy_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
27 27
 	int pad_len;
28 28
 
29 29
 	DBG ( "Transmitting %d bytes\n", pkb_len ( pkb ) );
30
-	pad_len = ( ETH_ZLEN - pkb_len ( pkb ) );
31
-	if ( pad_len > 0 )
32
-		memset ( pkb_put ( pkb, pad_len ), 0, pad_len );
30
+	pkb_pad ( pkb, ETH_ZLEN );
33 31
 	pkb_pull ( pkb, sizeof ( *ethhdr ) );
34 32
 	nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
35 33
 				ntohs ( ethhdr->h_protocol ),

Loading…
Annulla
Salva