From owner-freebsd-net@FreeBSD.ORG Fri Aug 22 11:33:24 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3609E16A4C2 for ; Fri, 22 Aug 2003 11:33:24 -0700 (PDT) Received: from hysteria.spc.org (hysteria.spc.org [195.206.69.234]) by mx1.FreeBSD.org (Postfix) with SMTP id 3D5D743FE1 for ; Fri, 22 Aug 2003 11:33:22 -0700 (PDT) (envelope-from bms@hysteria.spc.org) Received: (qmail 23310 invoked by uid 5013); 22 Aug 2003 18:30:18 -0000 Date: Fri, 22 Aug 2003 19:30:18 +0100 From: Bruce M Simpson To: Bill Fenner Message-ID: <20030822183018.GH1417@spc.org> Mail-Followup-To: Bruce M Simpson , Bill Fenner , freebsd-net@freebsd.org, wes@freebsd.org References: <200308221318.h7MDIwW24087@windsor.research.att.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308221318.h7MDIwW24087@windsor.research.att.com> User-Agent: Mutt/1.4.1i Organization: SPC cc: freebsd-net@freebsd.org cc: wes@freebsd.org Subject: Re: Receiving INADDR_BROADCAST packets X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Aug 2003 18:33:24 -0000 On Fri, Aug 22, 2003 at 06:18:57AM -0700, Bill Fenner wrote: > I think c) (perhaps combined with IP_RECVDSTADDR so that you know > whether you got a unicast or broadcast) is the correct answer. > I think binding UDP sockets to tell what interface/address was > the destination is a historical artifact. I've implemented the fix you've suggested. Thanks! I probably wouldn't need to bind sockets to each interface if I were doing purely broadcast traffic. I'm happy with what works for the time being, however; I may revisit this if I ever implement IPv6 support for the daemon I'm currently hacking. IP_ONESBCAST has saved a lot of trouble for me. Regards, BMS