[U-Boot-Users] Suspect behaiviour if gatewayip not set
Robin Gilks
robin.gilks at tait.co.nz
Wed Dec 22 21:53:20 CET 2004
Greetings
Having played with netconsole a bit, I've observed that the current
behaiviour of warning if gatewayip is not set and then using its value
of zero when talking to outside the current subnet is somewhat suspect.
The particular case of netconsole means that no error message is evident
- it is trying to be sent the error down the ethernet connection that is
being initiated with an arp(0.0.0.0)!
I propose that the warning message stay but the target address is put
into the arp so that a proxying router can reply to it rather then send
out a nonsense arp request.
CHANGELOGg:
* Patch by Robin Gilks 23 December 2004
net.c - if gatewayip not set send arp request for destination
IP not zero
--- net.c.old 2004-10-26 12:46:58.000000000 +1300
+++ net.c 2004-12-23 09:42:46.000000000 +1300
@@ -207,8 +207,10 @@
(NetOurIP & NetOurSubnetMask)) {
if (NetOurGatewayIP == 0) {
puts ("## Warning: gatewayip needed but not
set\n");
+ NetArpWaitReplyIP = NetArpWaitPacketIP;
+ } else {
+ NetArpWaitReplyIP = NetOurGatewayIP;
}
- NetArpWaitReplyIP = NetOurGatewayIP;
} else {
NetArpWaitReplyIP = NetArpWaitPacketIP;
}
--
Robin Gilks
Senior Design Engineer Phone: (+64)(3) 357 1569
Tait Electronics Fax : (+64)(3) 359 4632
PO Box 1645 Christchurch Email : robin.gilks at tait.co.nz
New Zealand
=======================================================================
This email, including any attachments, is only for the intended
addressee. It is subject to copyright, is confidential and may be
the subject of legal or other privilege, none of which is waived or
lost by reason of this transmission.
If the receiver is not the intended addressee, please accept our
apologies, notify us by return, delete all copies and perform no
other act on the email.
Unfortunately, we cannot warrant that the email has not been
altered or corrupted during transmission.
=======================================================================
More information about the U-Boot
mailing list