From 13ee152c43d552589d0aa44d2d1c47625a22b16d Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Sun, 15 Mar 1998 20:54:20 +0000 Subject: [PATCH] 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. --- common/socket.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/common/socket.c b/common/socket.c index 08f258f7..fbef4321 100644 --- a/common/socket.c +++ b/common/socket.c @@ -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) &&