Bläddra i källkod

For consistency

tags/v0.9.3
Michael Brown 19 år sedan
förälder
incheckning
968501e323
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1
    1
      src/net/ethernet.c

+ 1
- 1
src/net/ethernet.c Visa fil

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 );

Laddar…
Avbryt
Spara