]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Generalize fallback support.
authorTed Lemon <source@isc.org>
Mon, 21 Dec 1998 04:21:30 +0000 (04:21 +0000)
committerTed Lemon <source@isc.org>
Mon, 21 Dec 1998 04:21:30 +0000 (04:21 +0000)
server/bootp.c
server/dhcpd.c

index 8f0591259813f1d7697929535026bd092f9ab166..3bbb88ab9d10e778fcb2c3df1f1c9436fb332ca8 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: bootp.c,v 1.28.2.1 1998/06/29 22:14:11 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: bootp.c,v 1.28.2.2 1998/12/21 04:21:30 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -323,15 +323,15 @@ void bootp (packet)
                to.sin_addr = raw.giaddr;
                to.sin_port = local_port;
 
-#ifdef USE_FALLBACK
-               result = send_fallback (&fallback_interface,
-                                       (struct packet *)0,
-                                       &raw, outgoing.packet_length,
-                                       from, &to, &hto);
-               if (result < 0)
-                       warn ("send_fallback: %m");
-               return;
-#endif
+               if (fallback_interface) {
+                       result = send_packet (fallback_interface,
+                                             (struct packet *)0,
+                                             &raw, outgoing.packet_length,
+                                             from, &to, &hto);
+                       if (result < 0)
+                               warn ("send_packet: %m");
+                       return;
+               }
        /* Otherwise, broadcast it on the local network. */
        } else {
                to.sin_addr.s_addr = INADDR_BROADCAST;
index 7a589c7eb040f2c4f6829c6012ebd71dd24fe8cb..929300d8d317c5febe8d63d83a5014aa101f86fd 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char ocopyright[] =
-"$Id: dhcpd.c,v 1.45.2.4 1998/07/10 23:23:19 mellon Exp $ Copyright 1995, 1996, 1997, 1998 The Internet Software Consortium.";
+"$Id: dhcpd.c,v 1.45.2.5 1998/12/21 04:20:47 mellon Exp $ Copyright 1995, 1996, 1997, 1998 The Internet Software Consortium.";
 #endif
 
 static char copyright[] =
@@ -60,10 +60,6 @@ struct group root_group;
 struct iaddr server_identifier;
 int server_identifier_matched;
 
-#ifdef USE_FALLBACK
-struct interface_info fallback_interface;
-#endif
-
 u_int16_t local_port;
 u_int16_t remote_port;