mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 22:05:23 +00:00
Don't mention compiling with BPF if user has multiple interfaces - if it's not happening now, it probably doesn't work. Also, correct = vs == confusion that was causing packets to go out with bogus destination addresses.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
BSD socket interface code... */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 The Internet Software Consortium.
|
||||
* Copyright (c) 1995, 1996, 1997, 1998 The Internet Software Consortium.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static char copyright[] =
|
||||
"$Id: socket.c,v 1.26 1997/10/20 21:47:14 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
"$Id: socket.c,v 1.27 1998/03/15 20:54:20 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n";
|
||||
#endif /* not lint */
|
||||
|
||||
#include "dhcpd.h"
|
||||
@@ -105,12 +105,8 @@ int if_register_socket (info)
|
||||
#ifndef SO_BINDTODEVICE
|
||||
/* Make sure only one interface is registered. */
|
||||
if (once)
|
||||
error ("The standard socket API can only support %s%s%s%s%s",
|
||||
"hosts with a single network interface. If you must ",
|
||||
"run dhcpd on a host with multiple interfaces, ",
|
||||
"you must compile in BPF or NIT support. If neither ",
|
||||
"option is supported on your system, please let us ",
|
||||
"know.");
|
||||
error ("The standard socket API can only support %s",
|
||||
"hosts with a single network interface.");
|
||||
once = 1;
|
||||
#endif
|
||||
|
||||
@@ -203,7 +199,7 @@ ssize_t send_packet (interface, packet, raw, len, from, to, hto)
|
||||
result = sendto (interface -> wfdesc, (char *)raw, len, 0,
|
||||
(struct sockaddr *)to, sizeof *to);
|
||||
#ifdef IGNORE_HOSTUNREACH
|
||||
} while (to -> sin_addr.s_addr = htonl (INADDR_BROADCAST) &&
|
||||
} while (to -> sin_addr.s_addr == htonl (INADDR_BROADCAST) &&
|
||||
result < 0 &&
|
||||
(errno == EHOSTUNREACH ||
|
||||
errno == ECONNREFUSED) &&
|
||||
|
Reference in New Issue
Block a user