瀏覽代碼

For consistency

tags/v0.9.3
Michael Brown 19 年之前
父節點
當前提交
968501e323
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      src/net/ethernet.c

+ 1
- 1
src/net/ethernet.c 查看文件

49
 static int eth_transmit ( struct pk_buff *pkb, struct net_device *netdev,
49
 static int eth_transmit ( struct pk_buff *pkb, struct net_device *netdev,
50
 			  struct net_protocol *net_protocol,
50
 			  struct net_protocol *net_protocol,
51
 			  const void *ll_dest ) {
51
 			  const void *ll_dest ) {
52
-	struct ethhdr *ethhdr = pkb_push ( pkb, ETH_HLEN );
52
+	struct ethhdr *ethhdr = pkb_push ( pkb, sizeof ( *ethhdr ) );
53
 
53
 
54
 	memcpy ( ethhdr->h_dest, ll_dest, ETH_ALEN );
54
 	memcpy ( ethhdr->h_dest, ll_dest, ETH_ALEN );
55
 	memcpy ( ethhdr->h_source, netdev->ll_addr, ETH_ALEN );
55
 	memcpy ( ethhdr->h_source, netdev->ll_addr, ETH_ALEN );

Loading…
取消
儲存