mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-03 07:45:20 +00:00
When an interface goes away in FreeBSD, read(2) returns ENXIO, not
EIO. This fixes an annoying infinite-loop bug on FreeBSD. Fix suggested by: mellon
This commit is contained in:
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: bpf.c,v 1.48 2001/04/08 21:12:49 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: bpf.c,v 1.49 2002/06/08 09:28:15 murray Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -423,7 +423,11 @@ ssize_t receive_packet (interface, buf, len, from, hfrom)
|
|||||||
interface -> rbuf,
|
interface -> rbuf,
|
||||||
interface -> rbuf_max);
|
interface -> rbuf_max);
|
||||||
if (length <= 0) {
|
if (length <= 0) {
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
if (errno == ENXIO) {
|
||||||
|
#else
|
||||||
if (errno == EIO) {
|
if (errno == EIO) {
|
||||||
|
#endif
|
||||||
dhcp_interface_remove
|
dhcp_interface_remove
|
||||||
((omapi_object_t *)interface,
|
((omapi_object_t *)interface,
|
||||||
(omapi_object_t *)0);
|
(omapi_object_t *)0);
|
||||||
|
Reference in New Issue
Block a user