Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 2007 19:40:09 +0000
From:      "Bruce M. Simpson" <bms@FreeBSD.org>
To:        Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Cc:        freebsd-net@freebsd.org, LI Xin <delphij@delphij.net>
Subject:   Re: Different behavior of ping'ing INADDR_BROADCAST?
Message-ID:  <45A54119.20809@FreeBSD.org>
In-Reply-To: <20070107115158.GA63854@codelabs.ru>
References:  <459D4D88.2030708@delphij.net> <459FEDBC.4070008@FreeBSD.org> <20070107115158.GA63854@codelabs.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
Eygene Ryabinkin wrote:
>
> For me the routing gives the default gateway as the next hop, so the 'dst'
> will be rewritten at the line 241.
>   
You're quite right, I stand corrected -- the undirected broadcast case 
is hitting the default route.
> I think that this confirms my findings. Have you tried to look at your packet
> with tcpdump? Link-level MAC should be set to your routers one, not to yhe
> 0xffffffff.
>   
I saw this as well. The behaviour is actually as expected. FreeBSD has 
done this for years. Some years ago I did some work on a fix for this, 
but it was not net-smp safe.

Wes Peters suggested treating INADDR_BROADCAST traffic like 
multicast-routed traffic. Whilst the MROUTING code has queues for each 
entry in the Multicast Forwarding Cache (MFC) and knows how to dispatch 
the same mbuf chain more than once, it isn't compiled in by default.

Regards
BMS



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