Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Mar 2000 00:58:57 -0500
From:      "Matthew Zahorik" <matt@thebiz.net>
To:        <hackers@freebsd.org>
Subject:   Is this a bug?
Message-ID:  <006501bf948c$e11bc8d0$5321a118@matthome>

next in thread | raw e-mail | index | archive | help
While making a slew of diskless machines I've tracked down a kernel panic.

FreeBSD 4.0-RELEASE, kernel with BOOTP* enabled.

Each machine has a private and public network attached.  It netboots from
the private network.  Because of that, I didn't set a gw address in
bootptab.  The public network interface is brought up by the rc scripts.

After booting, since there was no gateway, the BOOTP code makes an
assumption and sets itself as the gateway and therefore starts proxy-arp.
The relevant bit of code in ./nfs/bootp_subr.c:

if (!gotgw) {
  /* Use proxyarp */
  gw.sin_addr.s_addr = myaddr.sin_addr.s_addr;
}

While the network table is in this state, if you ping anything outside of
the local network it causes a kernel panic (unaligned access fault) the
kernel in ip_input:310

ie.  From the console after boot, ping locally and it's fine.  Ping anything
off the local subnet and the kernel panics.  Definately don't start sendmail
with a non-local resolver.  Also don't telnet into the box, causing a
request to a non-local resolver.

This was on an Alpha box.  It may not reproduce on Intel, since it's more
tolerant of off-alignment memory access.

What I really need to know is, is this a bug or a is the proxy-arp gateway
assumption a desired behavior?  While the routing table is in this state,
you're an errant IP packet away from a panic (:

Since setting a gateway which was unreachable until the public interface
came up didn't seem like a great idea to me, my solution was to program out
the offending assumptions.  If gw isn't received in the bootp reply, no
default route is set.  Diffs against ./nfs/boop_subr.c are available if the
default behavior is wrong or considered obsolete.

- Matt

--
Matthew Zahorik  Director of Systems and Networking - BiznessOnline.com
matt@thebiz.net  President of AlbanyNet Inc. - a BiznessOnline subsidiary
maz@albany.net        Voice: (518) 292-1001  Fax: (518) 626-0793



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006501bf948c$e11bc8d0$5321a118>