]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add can_receive_unicast_unconfigured
authorTed Lemon <source@isc.org>
Mon, 29 Mar 1999 22:07:14 +0000 (22:07 +0000)
committerTed Lemon <source@isc.org>
Mon, 29 Mar 1999 22:07:14 +0000 (22:07 +0000)
common/bpf.c
common/dlpi.c
common/lpf.c
common/nit.c
common/socket.c
common/upf.c

index 38234064b0d67d5aba98ee94786ecd3872ada3b6..d1c3b1a7be85942245379e9084bad03ab61f1bc3 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: bpf.c,v 1.19.2.8 1999/02/23 22:09:56 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: bpf.c,v 1.19.2.9 1999/03/29 22:07:12 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -418,6 +418,12 @@ int can_unicast_without_arp ()
        return 1;
 }
 
+int can_receive_unicast_unconfigured (ip)
+       struct interface_info *ip;
+{
+       return 1;
+}
+
 void maybe_setup_fallback ()
 {
        struct interface_info *fbi;
index f566b0397b409dcbb077f85770d0fee5ab1a85be..a493a3c966bb56c3a226797a5577086a9a41787d 100644 (file)
@@ -1247,6 +1247,12 @@ int can_unicast_without_arp ()
        return 1;
 }
 
+int can_receive_unicast_unconfigured (ip)
+       struct interface_info *ip;
+{
+       return 1;
+}
+
 void maybe_setup_fallback ()
 {
        struct interface_info *fbi;
index 72531c922f36edd9f6063c4bf25b174e3e275bbc..4deecf85f24fea605ae442e1e4a51b8438bf37e1 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: lpf.c,v 1.1.2.7 1999/03/26 16:44:12 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: lpf.c,v 1.1.2.8 1999/03/29 22:07:13 mellon Exp $ Copyright (c) 1995, 1996, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -92,10 +92,12 @@ int if_register_lpf (info)
        if ((sock = socket(PF_PACKET, SOCK_PACKET, htons(ETH_P_ALL))) < 0) {
                if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
                    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
-                   errno == EAFNOSUPPORT || errno == EINVAL)
-                       error ("socket: %m - make sure %s %s!",
-                              "CONFIG_PACKET and CONFIG_FILTER are defined",
+                   errno == EAFNOSUPPORT || errno == EINVAL) {
+                       warn ("socket: %m");
+                       error ("Make sure to set %s %s!",
+                              "CONFIG_PACKET=y and CONFIG_FILTER=y",
                               "in your kernel configuration");
+               }
                error("Open a socket for LPF: %m");
        }
 
@@ -106,10 +108,12 @@ int if_register_lpf (info)
        if (bind (sock, &sa, sizeof sa)) {
                if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
                    errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
-                   errno == EAFNOSUPPORT || errno == EINVAL)
-                       error ("socket: %m - make sure %s %s!",
-                              "CONFIG_PACKET and CONFIG_FILTER are defined",
+                   errno == EAFNOSUPPORT || errno == EINVAL) {
+                       warn ("bind: %m");
+                       error ("Set %s %s!",
+                              "CONFIG_PACKET=y and CONFIG_FILTER=y",
                               "in your kernel configuration");
+               }
                error("Bind socket to interface: %m");
        }
 
@@ -280,6 +284,12 @@ int can_unicast_without_arp ()
        return 1;
 }
 
+int can_receive_unicast_unconfigured (ip)
+       struct interface_info *ip;
+{
+       return 1;
+}
+
 void maybe_setup_fallback ()
 {
        struct interface_info *fbi;
index 047f2a11ae553cad39479a2535755835de6415cd..77f43b38d98d85b3820a17a691334b06d9731555 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: nit.c,v 1.15.2.3 1999/02/23 22:09:54 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: nit.c,v 1.15.2.4 1999/03/29 22:07:14 mellon Exp $ Copyright (c) 1996 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -360,6 +360,12 @@ int can_unicast_without_arp ()
        return 1;
 }
 
+int can_receive_unicast_unconfigured (ip)
+       struct interface_info *ip;
+{
+       return 1;
+}
+
 void maybe_setup_fallback ()
 {
        struct interface_info *fbi;
index 8e1b274b668d6d214a0fbdecc5729d1d78128102..3d1b8f40f8c7e6f0bb56adcddd28937b6e7e1022 100644 (file)
@@ -50,7 +50,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: socket.c,v 1.26.2.10 1999/02/23 22:09:55 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: socket.c,v 1.26.2.11 1999/03/29 22:07:14 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -269,6 +269,16 @@ int can_unicast_without_arp ()
        return 0;
 }
 
+int can_receive_unicast_unconfigured (ip)
+       struct interface_info *ip;
+{
+#if defined (SOCKET_CAN_RECEIVE_UNICAST_UNCONFIGURED)
+       return 1;
+#else
+       return 0;
+#endif
+}
+
 /* If we have SO_BINDTODEVICE, set up a fallback interface; otherwise,
    do not. */
 
index c2f28c9286241ed0528b6000ec6fe412fbce7fd1..70f8efff1f477ddfe0af817e93687fa23cbff3fb 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: upf.c,v 1.3.2.4 1999/03/26 16:53:50 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: upf.c,v 1.3.2.5 1999/03/29 22:07:13 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -311,6 +311,12 @@ int can_unicast_without_arp ()
        return 1;
 }
 
+int can_receive_unicast_unconfigured (ip)
+       struct interface_info *ip;
+{
+       return 1;
+}
+
 void maybe_setup_fallback ()
 {
        struct interface_info *fbi;