Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 2002 19:15:28 -0500 (EST)
From:      Jason Hunt <leth@primus.ca>
To:        freebsd-net@FreeBSD.ORG
Cc:        Joshua Graessley <jgraessley@apple.com>
Subject:   Re: broadcast over loopback
Message-ID:  <20021206185424.P19254-100000@lethargic.dyndns.org>
In-Reply-To: <65242A88-0972-11D7-AE67-000393760260@apple.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 6 Dec 2002, Joshua Graessley wrote:

> I am aware of the issues with broadcast, and I strongly urge people to
> use multicast instead of broadcast for a variety of reasons. All the
> same, I've been asked to address this issue and I wanted to understand
> why FreeBSD doesn't allow broadcast on the loopback interface.
> Conceptually, it sort of makes sense to allow it. Using a broadcast
> should result in everyone on some link receiving your packet. If
> loopback is your only interface that's up, then why not use that? In
> the case of loopback, you are the only one on your link, so you should
> still receive your broadcast.
>
> Is there a technical reason this was done (i.e. if I set the broadcast
> flag on loopback I'll be chasing down other bugs until my hair turns
> grey or falls out) or is it a conceptual reason (i.e. broadcast, on
> loopback, are you out of your mind?).
>

With any kind of broadcast media, unless this is specific to Ethernet, or
there are some exceptions, a broadcast packet sent by a station is
received on every port other than the port that the packet came
from.  As far as I know, a station should never receive it's own broadcast
packets unless you have a loop somewhere in your Layer 2 infrastructure.
I believe that the above applies to IP broadcasts (or any other Layer 3
protocols) as well.


> Other platforms out there will handle broadcast on the loopback
> interface. Is it desirable to make changes to the FreeBSD stack to get
> this behavior?

Any examples?  I cannot think of a practical case where this would be
required.  I would think that an application will know if it sent a
broadcast or not, so it shouldn't have to receive that broadcast itself.
Anyone disagree?


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




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