Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 2009 17:10:51 -0800
From:      "Peter Steele" <psteele@maxiscale.com>
To:        "Peter Steele" <psteele@maxiscale.com>, <freebsd-net@freebsd.org>
Subject:   RE: Broadcast packet not being sent
Message-ID:  <2ACA3DE8F9758A48B8BE2C7A847F91F247A13A@polaris.maxiscale.com>
In-Reply-To: <2ACA3DE8F9758A48B8BE2C7A847F91F247A128@polaris.maxiscale.com>
References:  <2ACA3DE8F9758A48B8BE2C7A847F91F247A128@polaris.maxiscale.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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"



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