瀏覽代碼

Fix padding problem - from Michael

tags/v0.9.3
James Harper 18 年之前
父節點
當前提交
1c971f1234
共有 1 個檔案被更改,包括 1 行新增3 行删除
  1. 1
    3
      src/drivers/net/legacy.c

+ 1
- 3
src/drivers/net/legacy.c 查看文件

@@ -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…
取消
儲存