From owner-freebsd-net@FreeBSD.ORG Tue Jan 13 01:11:15 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 6798310656C0 for ; Tue, 13 Jan 2009 01:11:15 +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 435E18FC25 for ; Tue, 13 Jan 2009 01:11:14 +0000 (UTC) (envelope-from psteele@maxiscale.com) X-ASG-Debug-ID: 1231809054-2da900020000-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 EA56A37209 for ; Mon, 12 Jan 2009 17:10:54 -0800 (PST) Received: from polaris.maxiscale.com (polaris.maxiscale.com [10.100.1.24]) by arcturus.maxiscale.com with ESMTP id TRrfnAANFECdQ4tA for ; Mon, 12 Jan 2009 17:10:54 -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: Broadcast packet not being sent Date: Mon, 12 Jan 2009 17:10:51 -0800 Message-ID: <2ACA3DE8F9758A48B8BE2C7A847F91F247A13A@polaris.maxiscale.com> In-Reply-To: <2ACA3DE8F9758A48B8BE2C7A847F91F247A128@polaris.maxiscale.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Broadcast packet not being sent Thread-Index: Acl1Ei8tNQutfMoUTYKAVTX8jVjsIAACYJKQ References: <2ACA3DE8F9758A48B8BE2C7A847F91F247A128@polaris.maxiscale.com> From: "Peter Steele" To: "Peter Steele" , X-Barracuda-Connect: polaris.maxiscale.com[10.100.1.24] X-Barracuda-Start-Time: 1231809057 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at maxiscale.com Cc: Subject: RE: 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 01:11:16 -0000 Problem solved. I have to explicitly set cond.iface before sending the packet. User error... -----Original Message----- From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd-net@freebsd.org] On Behalf Of Peter Steele Sent: Monday, January 12, 2009 4:02 PM To: freebsd-net@freebsd.org Subject: Broadcast packet not being sent 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 _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"