2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-03 15:56:00 +00:00

Don't dump core when recursing to outermost scope.

This commit is contained in:
Ted Lemon
1999-03-09 23:40:22 +00:00
parent 551d1bc4e4
commit 195ce2f841

View File

@@ -3,7 +3,7 @@
Support for executable statements. */ Support for executable statements. */
/* /*
* Copyright (c) 1998 The Internet Software Consortium. * Copyright (c) 1998, 1999 The Internet Software Consortium.
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: execute.c,v 1.6 1999/02/25 23:30:34 mellon Exp $ Copyright (c) 1998 The Internet Software Consortium. All rights reserved.\n"; "$Id: execute.c,v 1.7 1999/03/09 23:40:22 mellon Exp $ Copyright (c) 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@@ -168,6 +168,10 @@ void execute_statements_in_scope (packet, in_options, out_options,
struct group *scope; struct group *scope;
struct group *limit; struct group *limit;
/* If we've recursed as far as we can, return. */
if (!group)
return;
/* As soon as we get to a scope that is outer than the limiting /* As soon as we get to a scope that is outer than the limiting
scope, we are done. This is so that if somebody does something scope, we are done. This is so that if somebody does something
like this, it does the expected thing: like this, it does the expected thing: