On Sat, Feb 09, 2002 at 04:13:14PM -0800, Guy Harris wrote:
> This causes the list of sockets on which we should turn promiscuous mode
> off when we exit (2.0[.x] won't do that automatically when the socket is
> closed) to include a socket that's already been closed, which causes an
> error message ("Can't restore interface flags (SIOCGIFFLAGS failed: Bad
> file number).").  (It also causes a crash; I'll look into why that
> happens.)

It happens because the list of sockets is actually a list of "pcap_t"s,
and promiscuous mode is turned off by the "pcap_t" being closed; closing
the "pcap_t" also involves freeing the "md.device" string on Linux, but
that's already been freed because the open failed, so we tried to free
the string twice.

My fix:

>       2) get the link-layer type before turning promiscuous mode on.

fixes that as well.
-
This is the TCPDUMP workers list. It is archived at
http://www.tcpdump.org/lists/workers/index.html
To unsubscribe use mailto:[EMAIL PROTECTED]?body=unsubscribe

Reply via email to