Skip to contentSkip to conversation

Suspect behaiviour if gatewayip not set

U-Boot-Users Applied Robin Gilks 2 participants 2 messages Dec 22, 2004 – Mar 12, 2006

lore
Share & tools
lore
#0 lore raw

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 2004-12-23 09:42:46.000000000 +1300 renamed from net.c.old 2004-10-26 12:46:58.000000000 +1300 +0 -0
@@ -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;
         }
Signature · 17 lines
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.
=======================================================================
#1 lore raw
Quoted 4 lines · In message <[email protected]> you wrote:

* Patch by Robin Gilks 23 December 2004
net.c - if gatewayip not set send arp request for destination
IP not zero

Applied. Thanks.

Best regards,

Wolfgang Denk

Signature · 4 lines
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"355/113 -- Not the famous irrational number PI,  but  an  incredible
simulation!"