From owner-freebsd-net@FreeBSD.ORG Tue Jan 13 00:02:14 2009 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 085FA106564A for ; Tue, 13 Jan 2009 00:02:14 +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 BE3E88FC0C for ; Tue, 13 Jan 2009 00:02:13 +0000 (UTC) (envelope-from psteele@maxiscale.com) X-ASG-Debug-ID: 1231804932-048400000000-QdxwpM 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 849493720D for ; Mon, 12 Jan 2009 16:02:12 -0800 (PST) Received: from polaris.maxiscale.com (polaris.maxiscale.com [10.100.1.24]) by arcturus.maxiscale.com with ESMTP id k2XOQWnMU2KJh5CM for ; Mon, 12 Jan 2009 16:02:12 -0800 (PST) X-ASG-Whitelist: Client X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 X-ASG-Orig-Subj: Broadcast packet not being sent Date: Mon, 12 Jan 2009 16:02:11 -0800 Message-ID: <2ACA3DE8F9758A48B8BE2C7A847F91F247A128@polaris.maxiscale.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Broadcast packet not being sent Thread-Index: Acl1Ei8tNQutfMoUTYKAVTX8jVjsIA== From: "Peter Steele" To: X-Barracuda-Connect: polaris.maxiscale.com[10.100.1.24] X-Barracuda-Start-Time: 1231804932 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at maxiscale.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Broadcast packet not being sent X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jan 2009 00:02:14 -0000 I am using scapy to construct a UDP broadcast packet. The code I'm using is: =20 packet=3DEther(dst=3D"ff:ff:ff:ff:ff:ff")/IP(dst=3D"255.255.255.255")/UDP= (dpor t=3D33333)/payload sendp(packet) Send 1 packets. =20 This works fine when I have an IP assigned to the box. However, when no IP is assigned, I get the following messages: The sendp generates these warnings: =20 WARNING: No route found for IPv6 destination :: (no default route?) WARNING: No route found (no default route?) WARNING: No route found (no default route?) WARNING: No route found (no default route?) =20 Sent 1 packets. =20 I assume these warnings are okay, since of course there can't be a route in a scenario like the one I'm using. It's the same environment a DHCP client would face. However, despite scapy saying the packet was sent, it does not in fact leave the machine (I've confirmed this with tcpdump). As I said, if the box has an IP address, then the packet is sent as expected, but that defeats the purpose since we are developing a custom DHCP-like protocol. =20 The only think suspicious that I am seeing is this error in /var/log/messages: =20 Jan 12 16:13:52 kernel: looutput: af=3D31 unexpected =20 I get one of these each time I try to send a broadcast when no IP is assigned. I did an google search but did not any useful hits on this. If anyone here has any idea what's going on, I'd appreciate some feedback. I think I have the correct packet constructed, but clearly something is wrong, and it may very well be user error. =20 Peter =20