]> The Tcpdump Group git mirrors - libpcap/commit
Bug fixes from Graeme Hewson <[email protected]>:
authorguy <guy>
Fri, 22 Feb 2002 09:20:11 +0000 (09:20 +0000)
committerguy <guy>
Fri, 22 Feb 2002 09:20:11 +0000 (09:20 +0000)
commit6c3ce3a573206751dd76ab8a129c79b1859af878
tree9e75e4fe5a9103eddda767c47103c99cffd1751f
parentbb0918aeef5e7a52826dba64468c54b002e7e89c
Bug fixes from Graeme Hewson <[email protected]>:

1. During termination processing set up by atexit() under a 2.0.x
   kernel, if a socket had been previously closed and the handle freed
   due to an error, pcap_close_all() and pcap_close_linux() would
   nevertheless try to work with these structures and then crash.
   pcap_close_linux() is now called directly when necessary during
   error processing.

2. atexit() could get called more than once because the did_atexit
   flag wasn't being set.

3. If iface_get_arptype() returns an error because the ioctl() call
   failed (probably due to "no such device"), live_open_new() now
   returns a fatal error to pcap_open_live() and the call to
   live_open_old() is short-circuited.

4. Applications using libpcap would appear to listen on an interface
   that was down.

   a. iface_bind() and iface_bind_old() now check for pending errors
      after bind().  In turn, pcap_open_live() now returns an error
      status if there was a pending error after bind().

   b. After draining the socket, set_kernel_filter() now checks to see
      if the error was the expected EAGAIN and returns a fatal error
      to pcap_setfilter() if not.  In turn, pcap_setfilter() now
      returns an error status if there was a network error.

5. pcap_setfilter() was putting an error message into errbuf after a
   failed call to install_bpf_program().  This was unnecessary since
   install_bpf_program() puts its own error message into errbuf.
CREDITS
pcap-linux.c