Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.sbin/dhcp/common Pull up revision 1.9 (requested by...
details: https://anonhg.NetBSD.org/src/rev/599487604cb6
branches: netbsd-1-5
changeset: 491266:599487604cb6
user: he <he%NetBSD.org@localhost>
date: Sat Apr 21 19:42:04 2001 +0000
description:
Pull up revision 1.9 (requested by mellon):
Fix various bugs:
- PR#11081 (dhclient loops if interface is unplugged)
- PR#12065 (/etc/resolv.conf corrupted during DHCP lease renewal)
- PR#9709 (same as 11081)
- PR#11080 (dhclient -w doesn't work)
- PR#9657 (dhclient requires writable lease file)
diffstat:
usr.sbin/dhcp/common/bpf.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 1f4fb065f1c2 -r 599487604cb6 usr.sbin/dhcp/common/bpf.c
--- a/usr.sbin/dhcp/common/bpf.c Sat Apr 21 19:41:43 2001 +0000
+++ b/usr.sbin/dhcp/common/bpf.c Sat Apr 21 19:42:04 2001 +0000
@@ -47,7 +47,7 @@
#ifndef lint
static char copyright[] =
-"$Id: bpf.c,v 1.3.2.3 2001/04/04 20:55:17 he Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: bpf.c,v 1.3.2.4 2001/04/21 19:42:04 he Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -254,7 +254,7 @@
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
@@ -422,8 +422,14 @@
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);
}
Home |
Main Index |
Thread Index |
Old Index