http://git.etherboot.org
/
people
/
xl0
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
7826de3
)
Legacy drivers will not pad when necessary
author
Michael Brown
<mcb30@etherboot.org>
Mon, 5 Jun 2006 16:10:36 +0000
(16:10 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Mon, 5 Jun 2006 16:10:36 +0000
(16:10 +0000)
src/drivers/net/legacy.c
patch
|
blob
|
history
diff --git
a/src/drivers/net/legacy.c
b/src/drivers/net/legacy.c
index
1b36c0d
..
6e9c8ae
100644
(file)
--- a/
src/drivers/net/legacy.c
+++ b/
src/drivers/net/legacy.c
@@
-21,7
+21,11
@@
struct nic nic;
static int legacy_transmit ( struct net_device *netdev, struct pk_buff *pkb ) {
struct nic *nic = netdev->priv;
struct ethhdr *ethhdr = pkb->data;
+ int pad_len;
+ pad_len = ( ETH_ZLEN - pkb_len ( pkb ) );
+ if ( pad_len > 0 )
+ memset ( pkb_put ( pkb, pad_len ), 0, pad_len );
pkb_pull ( pkb, sizeof ( *ethhdr ) );
nic->nic_op->transmit ( nic, ( const char * ) ethhdr->h_dest,
ntohs ( ethhdr->h_protocol ),