diff options
Diffstat (limited to 'net/rarp.c')
-rw-r--r-- | net/rarp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/rarp.c b/net/rarp.c index f9df07658e..1ba60e803c 100644 --- a/net/rarp.c +++ b/net/rarp.c @@ -96,8 +96,7 @@ RarpRequest (void) printf("RARP broadcast %d\n", ++RarpTry); pkt = NetTxPacket; - NetSetEther(pkt, NetBcastAddr, PROT_RARP); - pkt += ETHER_HDR_SIZE; + pkt += NetSetEther(pkt, NetBcastAddr, PROT_RARP); rarp = (ARP_t *)pkt; @@ -114,7 +113,7 @@ RarpRequest (void) rarp->ar_data[16 + i] = 0xff; } - NetSendPacket(NetTxPacket, ETHER_HDR_SIZE + ARP_HDR_SIZE); + NetSendPacket(NetTxPacket, (pkt - NetTxPacket) + ARP_HDR_SIZE); NetSetTimeout(TIMEOUT * CFG_HZ, RarpTimeout); NetSetHandler(RarpHandler); |