]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Don't search the attached network if there isn't one.
authorTed Lemon <source@isc.org>
Wed, 22 May 1996 08:15:18 +0000 (08:15 +0000)
committerTed Lemon <source@isc.org>
Wed, 22 May 1996 08:15:18 +0000 (08:15 +0000)
common/dispatch.c
dispatch.c

index a55c88c562749f57bb0887c99724e559f4b87268..236b04637b2679de62811715563b61197c6ef303 100644 (file)
@@ -211,7 +211,9 @@ void discover_interfaces ()
 
                /* Find subnets that don't have valid interface
                   addresses... */
-               for (subnet = tmp -> shared_network -> subnets;
+               for (subnet = (tmp -> shared_network
+                              ? tmp -> shared_network -> subnets
+                              : (struct subnet *)0);
                     subnet; subnet = subnet -> next_sibling) {
                        if (!subnet -> interface_address.len) {
                                warn ("subnet %s attached to interface %s %s",
index a55c88c562749f57bb0887c99724e559f4b87268..236b04637b2679de62811715563b61197c6ef303 100644 (file)
@@ -211,7 +211,9 @@ void discover_interfaces ()
 
                /* Find subnets that don't have valid interface
                   addresses... */
-               for (subnet = tmp -> shared_network -> subnets;
+               for (subnet = (tmp -> shared_network
+                              ? tmp -> shared_network -> subnets
+                              : (struct subnet *)0);
                     subnet; subnet = subnet -> next_sibling) {
                        if (!subnet -> interface_address.len) {
                                warn ("subnet %s attached to interface %s %s",