From owner-freebsd-questions@FreeBSD.ORG Tue Jan 6 22:38:28 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 643EC1065672 for ; Tue, 6 Jan 2009 22:38:28 +0000 (UTC) (envelope-from psteele@maxiscale.com) Received: from arcturus.maxiscale.com (arcturus.maxiscale.com [76.231.178.136]) by mx1.freebsd.org (Postfix) with ESMTP id 40CD18FC12 for ; Tue, 6 Jan 2009 22:38:27 +0000 (UTC) (envelope-from psteele@maxiscale.com) X-ASG-Debug-ID: 1231281506-0c2500000000-jLrpzn X-Barracuda-URL: http://10.100.1.25:8000/cgi-bin/mark.cgi Received: from polaris.maxiscale.com (localhost [127.0.0.1]) by arcturus.maxiscale.com (Spam Firewall) with ESMTP id 71EDD35E96 for ; Tue, 6 Jan 2009 14:38:26 -0800 (PST) Received: from polaris.maxiscale.com (polaris.maxiscale.com [10.100.1.24]) by arcturus.maxiscale.com with ESMTP id 3k649DxOGaJF4qEc for ; Tue, 06 Jan 2009 14:38:26 -0800 (PST) X-ASG-Whitelist: Client X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-ASG-Orig-Subj: RE: Do UDP broadcasts work in FreeBSD? Date: Tue, 6 Jan 2009 14:38:24 -0800 Message-ID: <2ACA3DE8F9758A48B8BE2C7A847F91F2479E56@polaris.maxiscale.com> In-Reply-To: <2ACA3DE8F9758A48B8BE2C7A847F91F2479E3F@polaris.maxiscale.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Do UDP broadcasts work in FreeBSD? Thread-Index: AclwPgGFrFG1/uUgSByWkr1Zmb9a1QAA+aMQAAK/5aA= References: <2ACA3DE8F9758A48B8BE2C7A847F91F2479DF3@polaris.maxiscale.com><69A0F543-74D4-4D38-A0A5-A0EDE87A3DBB@mac.com> <2ACA3DE8F9758A48B8BE2C7A847F91F2479E3F@polaris.maxiscale.com> From: "Peter Steele" To: X-Barracuda-Connect: polaris.maxiscale.com[10.100.1.24] X-Barracuda-Start-Time: 1231281506 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at maxiscale.com Subject: RE: Do UDP broadcasts work in FreeBSD? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jan 2009 22:38:28 -0000 > I've already looked at the ISC DHCP source code. They use raw sockets to > send their broadcasts, which seems to us to be a convoluted way of > sending a simple broadcast. I've seen examples of DHCP client/server > code written in Java using standard UDP. Unfortunately, our own system > is already largely implemented in Java/Python, so we'll need to provide > a JNI interface to support raw sockets. Alternatively we may patch the > kernel to fix the bug at its source. Another option we're considering is to use the firewall to detect broadcasts and rewrite the MAC addresses in the outgoing packets. In looking at tcpdump output of broadcasts, the IP address is set to 255.255.255.255 and the MAC address is set to the MAC address of the gateway. On Linux boxes the MAC address is ff:ff:ff:ff:ff:ff, and that's the only significant difference in the packet. We thought we might be able to come up with a firewall rule to detect broadcasts and change the MAC address to the same as what Linux uses. I'm still in the process of researching this, but if someone can tell me this is impossible, I'll move on.