From a3d991bd0da8b9fb9dbf2c7481091c3d082b9b13 Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 15 Apr 2004 21:48:45 +0000 Subject: Patches by Pantelis Antoniou, 30 Mar 2004: add networking support for VLANs (802.1q), and CDP (Cisco Discovery Protocol) --- net/rarp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'net/rarp.c') diff --git a/net/rarp.c b/net/rarp.c index f9df07658ea..1ba60e803cc 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); -- cgit v1.2.3