From: Nick Barnes <Nick.Barnes@pobox.com>
To: ecos-discuss@sources.redhat.com
Cc: ecos-discuss@sourceware.cygnus.com
Subject: Re: [ECOS] connect() to machine outside local network
Date: Fri, 14 Jul 2000 06:37:00 -0000 [thread overview]
Message-ID: <10156.963581842@raven.ravenbrook.com> (raw)
In-Reply-To: <ptlmz429be.fsf@masala.cygnus.co.uk>
At 2000-07-14 12:19:33+0000, "Hugo 'NOx' Tyson" writes:
>
> Nick Barnes <Nick.Barnes@pobox.com> writes:
> > It seems to me that build_bootp_record() in network_support.c should
> >
> > add_tag(vp, TAG_GATEWAY, ...)
> >
> > and that its failure to do so could account for my problems here.
> >
> > This from single stepping through most of init_all_network_interfaces().
>
> This is if it's statically configured, right? You're right, that makes
> perfect sense, I'll see to it. BTW, full DHCP coming real soon...
I had to make two changes to get this to work. first I did this
in build_bootp_record:
#define DONT_FORGET_TO_ADD_GATEWAY 1
#if DONT_FORGET_TO_ADD_GATEWAY
addr = inet_addr(addrs_gateway);
vp = add_tag(vp, TAG_GATEWAY, &addr, sizeof(in_addr_t));
#endif
This still didn't work. It told me (addressed redacted):
Route - dst: 192.168.0.0, mask: 255.255.255.0, gateway: 192.168.0.92
which is the wrong mask for a default gateway. So I added this in the
obvious place in bootp_support.c:
#define SET_GATEWAY_ROUTE_MASK_TO_ZERO 1
#if SET_GATEWAY_ROUTE_MASK_TO_ZERO
memset(&route.rt_genmask, 0, sizeof(route.rt_genmask));
#else
addrp->sin_addr = netmask;
memcpy(&route.rt_genmask, addrp, sizeof(*addrp));
#endif
And now I can establish connections with the rest of the world.
This may well not be the best way to do this.
Nick B
--
FreeBSD 2.2.8-RELEASE: up 12 days, 19:25
last reboot Sat Jul 1 19:26 (lightning strike)
next prev parent reply other threads:[~2000-07-14 6:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <396CAA52.A429F2C6@berger.to>
2000-07-14 4:37 ` Nick Barnes
2000-07-14 5:30 ` Hugo 'NOx' Tyson
2000-07-14 5:34 ` Nick Barnes
2000-07-14 5:39 ` Andrew Lunn
2000-07-14 8:45 ` Hugo 'NOx' Tyson
2000-07-14 9:17 ` Andrew Lunn
2000-07-14 6:37 ` Nick Barnes [this message]
2000-07-12 7:36 Nick Barnes
2000-07-12 7:44 ` Gary Thomas
2000-07-12 7:48 ` Nick Barnes
2000-07-12 9:10 ` Nick Barnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=10156.963581842@raven.ravenbrook.com \
--to=nick.barnes@pobox.com \
--cc=ecos-discuss@sources.redhat.com \
--cc=ecos-discuss@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).