* [ECOS] BOOTP - default route
@ 2000-09-11 6:41 Joerg Troeger
2000-09-11 6:53 ` Gary Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Joerg Troeger @ 2000-09-11 6:41 UTC (permalink / raw)
To: ecos-discuss
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 177 bytes --]
The default route is not set correctly in bootp_support.c
Solution: initialize addrp->sin_len before line #466 (copy from line #427).
It was overwritten in line #453.
Jörg
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [ECOS] BOOTP - default route
2000-09-11 6:41 [ECOS] BOOTP - default route Joerg Troeger
@ 2000-09-11 6:53 ` Gary Thomas
0 siblings, 0 replies; 2+ messages in thread
From: Gary Thomas @ 2000-09-11 6:53 UTC (permalink / raw)
To: Joerg Troeger; +Cc: ecos-discuss
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2187 bytes --]
On 11-Sep-2000 Joerg Troeger wrote:
> The default route is not set correctly in bootp_support.c
>
> Solution: initialize addrp->sin_len before line #466 (copy from line #427).
> It was overwritten in line #453.
>
> Jörg
>
Thanks for pointing this out. I'll apply this patch:
Index: net/tcpip/current/ChangeLog
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/net/tcpip/current/ChangeLog,v
retrieving revision 1.91
diff -u -5 -p -r1.91 ChangeLog
--- net/tcpip/current/ChangeLog 2000/09/08 20:40:25 1.91
+++ net/tcpip/current/ChangeLog 2000/09/11 13:51:32
@@ -1,5 +1,9 @@
+2000-09-11 Joerg Troeger <jtroeger@nortelnetworks.com>
+
+ * src/lib/bootp_support.c (init_net): Set default route correctly.
+
2000-09-01 Hugo Tyson <hmt@cygnus.co.uk>
* src/ecos/support.c (cyg_net_init): You can't print things while
initializing the network! Well, not if connected to GDB over the
network anyway. The printf("Init device '%s'...); removed.
Index: net/tcpip/current/src/lib/bootp_support.c
===================================================================
RCS file: /local/cvsfiles/ecc/ecc/net/tcpip/current/src/lib/bootp_support.c,v
retrieving revision 1.13
diff -u -5 -p -r1.13 bootp_support.c
--- net/tcpip/current/src/lib/bootp_support.c 2000/07/27 14:02:41 1.13
+++ net/tcpip/current/src/lib/bootp_support.c 2000/09/11 13:51:34
@@ -461,10 +461,11 @@ init_net(const char *intf, struct bootp
// ...and it's a nonzero address...
if ( 0 != gateway.s_addr ) {
memset(&route, 0, sizeof(route));
addrp->sin_family = AF_INET;
addrp->sin_port = 0;
+ addrp->sin_len = sizeof(*addrp);
addrp->sin_addr.s_addr = 0; // Use 0,0,GATEWAY for the default route
memcpy(&route.rt_dst, addrp, sizeof(*addrp));
addrp->sin_addr.s_addr = 0;
memcpy(&route.rt_genmask, addrp, sizeof(*addrp));
addrp->sin_addr = gateway;
Of course, if you don't want your name in the ChangeLog, I can put my own
since it's such a small change, but we always like to give proper credit.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-09-11 6:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-11 6:41 [ECOS] BOOTP - default route Joerg Troeger
2000-09-11 6:53 ` Gary Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).