Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Apr 1996 17:09:36 -0600 (CST)
From:      Joe Greco <jgreco@brasil.moneng.mei.com>
To:        boot@mosquito.com (Bruce Bauman)
Cc:        freebsd-isp@freebsd.org
Subject:   Re: named and IP aliases
Message-ID:  <199604012309.RAA25216@brasil.moneng.mei.com>
In-Reply-To: <199604012057.PAA10027@itchy.mosquito.com> from "Bruce Bauman" at Apr 1, 96 03:57:14 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> We are a small ISP running vanilla 2.1-stable. We run virtual web servers for
> several of our customers via Apache and IP aliases. Now for the question:
> 
> I saw a recent post saying that named had a bug where it would listen on
> all of the "aliased" interfaces, which are really all the same host. 

THAT's not a bug, it's behaviour you would tend to expect.

> Is this
> bug present in -stable, and if so should we update to the newest named?

The bug I think you're referring to is the one where you have a case like

ifconfig ed0 206.55.64.117; ifconfig ed0 alias 206.55.64.69

In this case I run 64.69 as a "nailed down" DNS address.

The bug I ran into is that a UDP datagram sent to the alias interface will
get received twice by named, once on the alias interface, once on the
"primary" interface.  The ensuing race condition to answer the request is,
by itself, harmless, but other BIND servers will "freak out" if and when
they receive a reply to a message that had been sent to "the other"
interface.

In other words, you send data to 206.55.64.69, named gets request on BOTH
the sockets attached to .117 and .69, replies first to the one on ".117",
and that reply gets to the remote named.  The remote named has trouble with
this, but eventually everything works.

Oddly enough, this prompted me to go look at smyrno.sol.net, which you have
an account on.  I never installed the patch!  :-)  Thanks for reminding me.

Some kind soul dug through the IP networking code and devised a patch.  I
don't have the patch off the top of my head, or a name to credit this patch
to, but a diff -c on files yields:

anacreon% diff -c in.c{.fcs,}
*** in.c.fcs    Sat Jul 22 22:38:11 1995
--- in.c        Thu Jan 25 10:29:38 1996
***************
*** 609,615 ****
                     /*
                      * Check for old-style (host 0) broadcast.
                      */
!                    t == ia->ia_subnet || t == ia->ia_net))
                            return 1;
        return (0);
  #undef ia
--- 609,621 ----
                     /*
                      * Check for old-style (host 0) broadcast.
                      */
!                    t == ia->ia_subnet || t == ia->ia_net) &&
!                    /*
!                     * Check for an all one subnetmask. These
!                     * only exist when an interface gets a secondary
!                     * address.
!                     */
!                    ia->ia_subnetmask != (u_long)0xffffffff)
                            return 1;
        return (0);
  #undef ia
anacreon%


Somebody might want to see that this hasn't broken in -current.  If memory
serves, the "host 0" broadcast address was broken^H^H^H^H^H^Hremoved.

> Thanks in advance.
> 
> -- Bruce

In the meantime I'm gonna rebuild Smyrno's kernel...  ;-)

... Joe

-------------------------------------------------------------------------------
Joe Greco - Systems Administrator			      jgreco@ns.sol.net
Solaria Public Access UNIX - Milwaukee, WI			   414/546-7968



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604012309.RAA25216>