Subject: Re: IPv4 multicast transmission when there's no interface
To: Jun-ichiro itojun Hagino <itojun@iijlab.net>
From: Matt Thomas <matt@3am-software.com>
List: tech-net
Date: 01/08/2002 05:03:35
At 07:16 PM 1/8/2002 +0900, Jun-ichiro itojun Hagino wrote:
> when there's no IPv4 address assigned to the multicast outgoing
> interface (specified by setsockopt), kernel made panic. i've
> committed
> the following change to avoid the kernel panic. historic behavior
> was to use 0.0.0.0 as source.
> my question is, which behavior look better? do any of you know
> apps that assumes "0.0.0.0 as source" behavior?
>
> reasoning for using 0.0.0.0 as source:
> "0.0.0.0 as source" is legal only while the interface is
> being initialized (RFC1122 p30), therefore, if there's some
> user program that uses multicast for interface
> initialization,
> they want the behavior.
> reasoning for forbidding packet transmission:
> IP source address must be one of the interface addresses that
> belong to outgoing interface (RFC1112 p6). if there's none,
> we shouldn't send packet.
If NetBSD supported unnumbered interfaces, then the proper thing would be to
use the parent interface's primary address. If the the parent's primary
address
wasn't set, then you'd default back to the router-id of the system. If no
router-id was set, you'd return EADDRNOTAVAIL. You would never use 0.0.0.0 as
the source address.
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message