Path: csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit4.readnews.com!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Problem receiving UDP broadcast packets. Date: Thu, 21 Apr 2011 14:22:01 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 41 Message-ID: References: <4dae172e$0$65870$e4fe514c@news.xs4all.nl> <4dae1d82$0$81483$e4fe514c@news.xs4all.nl> NNTP-Posting-Host: dsl.comtrol.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reader1.panix.com 1303395721 29271 64.122.56.22 (21 Apr 2011 14:22:01 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 21 Apr 2011 14:22:01 +0000 (UTC) User-Agent: slrn/pre0.9.9-102 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:3802 On 2011-04-21, Dan Stromberg wrote: > On Wed, Apr 20, 2011 at 7:21 AM, Grant Edwards wrote: >> On 2011-04-20, Dan Stromberg wrote: >>> On Tue, Apr 19, 2011 at 8:12 PM, Dan Stromberg wrote: >>>> I agree though that you're kind of pushing IP in a direction it wasn't >>>> intended to go. >>> >>> It just occurred to me: You might get some additional mileage out of >>> popping the network adapter into promiscuous mode. ?In fact, it Might >>> be necessary irrespective of the rest of your approach. >> >> The network adapter is already receiving all the packets I want to >> receive, so putting it into promiscuous mode would only increase the >> number of unwanted packets. > > I think tcpdump and tshark (was tethereal) will put the interface into > promiscuous mode so it can see more traffic; It can (and by default does). I was using "-p" so it didn't. > on OSF/1 (Tru64), we had > to do this manually for said programs to see all that was possible > (barring the presence of a switch not repeating packets the way > routers and hubs would). * The packets were being sent to MAC address ff:ff:ff:ff:ff:ff, so the NIC does not have to be in promiscuous mode to receive them. * tcpdump saw them even when it doesn't put the NIC in promiscuous mode. * The kernel was seeing the packets because it was logging them as martians and discarding them (something I didn't notice until later). * Turning off reverse-path filtering in the TCP stack allowed the packets to be received as expected. -- Grant Edwards grant.b.edwards Yow! I was making donuts at and now I'm on a bus! gmail.com