
Wolfgang hi.
The previous patch, has an ARP problem when the server is not on the same subnet.
The following patch, fixes it.
Sorry about that.
Regards
Pantelis
--- ../x/u-boot-0.3.0-ping/net/net.c Tue Apr 22 17:07:21 2003 +++ net/net.c Tue Apr 22 17:35:13 2003 @@ -133,6 +133,7 @@ /**********************************************************************/
IPaddr_t NetArpWaitPacketIP; +IPaddr_t NetArpWaitReplyIP; uchar *NetArpWaitPacketMAC; /* MAC address of waiting packet's destination */ uchar *NetArpWaitTxPacket = 0; /* THE transmit packet */ int NetArpWaitTxPacketSize; @@ -170,11 +171,11 @@ if (NetOurGatewayIP == 0) { puts ("## Warning: gatewayip needed but not set\n"); } - NetWriteIP((uchar*)&arp->ar_data[16], NetOurGatewayIP); - } else { - NetWriteIP((uchar*)&arp->ar_data[16], NetArpWaitPacketIP); - } + NetArpWaitReplyIP = NetOurGatewayIP; + } else + NetArpWaitReplyIP = NetArpWaitPacketIP;
+ NetWriteIP((uchar*)&arp->ar_data[16], NetArpWaitReplyIP); (void) eth_send(NetTxPacket, ETHER_HDR_SIZE + ARP_HDR_SIZE); }
@@ -716,7 +717,7 @@ tmp = NetReadIP(&arp->ar_data[6]);
/* matched waiting packet's address */ - if (tmp == NetArpWaitPacketIP) { + if (tmp == NetArpWaitReplyIP) { #ifdef ET_DEBUG printf("Got it\n"); #endif