Browse Source

Fix padding problem - from Michael

tags/v0.9.3
James Harper 18 years ago
parent
commit
1c971f1234
1 changed files with 1 additions and 3 deletions
  1. 1
    3
      src/drivers/net/legacy.c

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

27
 	int pad_len;
27
 	int pad_len;
28
 
28
 
29
 	DBG ( "Transmitting %d bytes\n", pkb_len ( pkb ) );
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
 	pkb_pull ( pkb, sizeof ( *ethhdr ) );
31
 	pkb_pull ( pkb, sizeof ( *ethhdr ) );
34
 	nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
32
 	nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
35
 				ntohs ( ethhdr->h_protocol ),
33
 				ntohs ( ethhdr->h_protocol ),

Loading…
Cancel
Save