Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2005 16:55:09 -0800 (PST)
From:      Doug White <dwhite@gumbysoft.com>
To:        Michael Voucko <voucko@gmx.li>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: "message too long" when sending broadcasts
Message-ID:  <20051119165212.O88861@carver.gumbysoft.com>
In-Reply-To: <437B1466.8030202@gmx.li>
References:  <437B1466.8030202@gmx.li>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 16 Nov 2005, Michael Voucko wrote:

> Hi,
>
> I'm trying to install the latest version of heartbeat (linux-ha), which
> unfortunately is not available from the ports tree yet.
> Setup is two boxes running (5.4-STABLE FreeBSD from Oct 17 2005) both connected
> to a hub with lnc NICs on a private 10.0.0.0/24 subnet (actually its only a
> 'simulated hub' provided by VMWare if this matters).
>
> After some initial struggles configuration, build and installations works as
> expected - but now the most basic parts of this application won't work anymore.
> When trying to use UDP broadcast messages for the heartbeat it would error out
> with "Message too long" for packets larger than 1472 bytes, in other words as
> soon as fragmentation of the package would be necessary (MTU is 1500).
>
> I received a code snippet from the heartbeat developers to isolate the problem
> (create sender and receiver socket, send broadcast packets of a certain size).
> To rule out VMware as the basic problem I tried real boxes but the problem
> persists.
>
> Is there any size restriction for UDP broadcast messages?
> Is there anything which prevents UDP broadcast from being fragmented?
>
> I searched RFCs, man pages for socket, setsockopt, ioctl, sendto and other
> places but did not find anything that could explain the behaviour (which seems
> to be no problem on other OS).
>
> Any pointers, comments?

>From sendmsg(2):

     The address of the target is given by to with tolen specifying its size.
     The length of the message is given by len.  If the message is too long to
     pass atomically through the underlying protocol, the error EMSGSIZE is
     returned, and the message is not transmitted.

I remember debugging some funky behavior regarding fragmenting packets and
UDPv6 some time ago. I don't remember if a fix was committed or not.

-- 
Doug White                    |  FreeBSD: The Power to Serve
dwhite@gumbysoft.com          |  www.FreeBSD.org



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