#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.46 2001/02/26 22:21:05 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.47 2001/04/05 20:47:34 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
if (v.bv_major != BPF_MAJOR_VERSION ||
v.bv_minor < BPF_MINOR_VERSION)
- log_fatal ("Kernel BPF version out of range - recompile dhcpd!");
+ log_fatal ("BPF version mismatch - recompile DHCP!");
/* Set immediate mode so that reads return as soon as a packet
comes in, rather than waiting for the input buffer to fill with
length = read (interface -> rfdesc,
interface -> rbuf,
interface -> rbuf_max);
- if (length <= 0)
+ if (length <= 0) {
+ if (errno == EIO) {
+ dhcp_interface_remove
+ ((omapi_object_t *)interface,
+ (omapi_object_t *)0);
+ }
return length;
+ }
interface -> rbuf_offset = 0;
interface -> rbuf_len = BPF_WORDALIGN (length);
}