public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] IP limited broadcasts problems
@ 2001-05-19  9:54 Robin Farine
  2001-05-21  1:15 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Robin Farine @ 2001-05-19  9:54 UTC (permalink / raw)
  To: ecos-discuss

Hi,

It seems to me that the OpenBSD IP stack does not handle correctly IP limited
broadcasts. Take a host with N Ethernet interfaces, each with an IP address on a
separate IP subnet and with the flag IFF_BROADCAST set. The host sends an IP
limited broadcast. I would expect that an Ethernet broadcast goes out of each
interface (provided that a route to the interface's specific IP subnet exists
for each interface). But ip_output() handles limited broadcast the same way as
any other packet: it looks for a matching route and passes the packet to the
interface associated with the route. The net result: the packet does not appear
on any interface but the matched one.

Moreover, if one adds a default route with a gateway, the stack then sends a
limited IP broadcast packet as an Ethernet *unicast* to the gateway!

Did someone already observed & reported this problem or should I rather go to
sleep, and then read TCP/IP Illustrated again?

Robin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] IP limited broadcasts problems
  2001-05-19  9:54 [ECOS] IP limited broadcasts problems Robin Farine
@ 2001-05-21  1:15 ` Andrew Lunn
  2001-05-21  1:45   ` Robin Farine
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2001-05-21  1:15 UTC (permalink / raw)
  To: Robin Farine; +Cc: ecos-discuss

On Sat, May 19, 2001 at 06:54:41PM +0200, Robin Farine wrote:
> It seems to me that the OpenBSD IP stack does not handle correctly
> IP limited broadcasts. Take a host with N Ethernet interfaces, each
> with an IP address on a separate IP subnet and with the flag
> IFF_BROADCAST set. The host sends an IP limited broadcast. I would
> expect that an Ethernet broadcast goes out of each interface
> (provided that a route to the interface's specific IP subnet exists
> for each interface).

> Did someone already observed & reported this problem or should I
> rather go to sleep, and then read TCP/IP Illustrated again?

Good morning Robin, Hope you slept well.

I just checked the Internet STD documents to see if this is broken
according to the standards. Best i could find was, in std3,
"Requirements for Internet Hosts" 

              There has been discussion on whether a datagram addressed
              to the Limited Broadcast address ought to be sent from all
              the interfaces of a multihomed host.  This specification
              takes no stand on the issue.

So it seems this falls into one of those gray areas. 

You probably want to swap mailing lists and post to an OpenBSD
list. It may also be worth looking at an OpenBSD application that uses
Limited broadcasts. rwhod should be a simple example, or DHCP server
for something more complex.

        Andrew

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [ECOS] IP limited broadcasts problems
  2001-05-21  1:15 ` Andrew Lunn
@ 2001-05-21  1:45   ` Robin Farine
  0 siblings, 0 replies; 3+ messages in thread
From: Robin Farine @ 2001-05-21  1:45 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Andrew Lunn <andrew.lunn@ascom.ch> writes:

> On Sat, May 19, 2001 at 06:54:41PM +0200, Robin Farine wrote:
> > It seems to me that the OpenBSD IP stack does not handle correctly
> > IP limited broadcasts. Take a host with N Ethernet interfaces, each
> > with an IP address on a separate IP subnet and with the flag
> > IFF_BROADCAST set. The host sends an IP limited broadcast. I would
> > expect that an Ethernet broadcast goes out of each interface
> > (provided that a route to the interface's specific IP subnet exists
> > for each interface).
> 
> > Did someone already observed & reported this problem or should I
> > rather go to sleep, and then read TCP/IP Illustrated again?
> 
> Good morning Robin, Hope you slept well.

Not too bad and, after 3 pages of TCP/IP Illustrated, I fell asleep again so
...

> 
> I just checked the Internet STD documents to see if this is broken according
> to the standards. Best i could find was, in std3, "Requirements for Internet
> Hosts"
> 
>               There has been discussion on whether a datagram addressed
>               to the Limited Broadcast address ought to be sent from all
>               the interfaces of a multihomed host.  This specification
>               takes no stand on the issue.
> 
> So it seems this falls into one of those gray areas. 
> 
> You probably want to swap mailing lists and post to an OpenBSD
> list.

Not required, the stack clearly conforms to the grey area.

> It may also be worth looking at an OpenBSD application that uses Limited
> broadcasts. rwhod should be a simple example, or DHCP server for something
> more complex.

I bet that such services work only on host with one interface. On Linux, they
have added a feature that lets an application bind a socket to a specific
interface for this purpose. It seems that the OpenBSD stack does not include
anything like this. Bad news for our DHCP relay!

Robin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-05-21  1:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-19  9:54 [ECOS] IP limited broadcasts problems Robin Farine
2001-05-21  1:15 ` Andrew Lunn
2001-05-21  1:45   ` Robin Farine

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).