summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-10 20:35:30 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:17 -0500
commitc3e2207cb40386c565b23fcabc8c7384b10216de (patch)
tree9cc0c517f09cc476f04350aa2785a02942362ae1 /source
parentf1b22c952719f004d7e33813c4d0f10514e1fff9 (diff)
downloadsamba-c3e2207cb40386c565b23fcabc8c7384b10216de.tar.gz
samba-c3e2207cb40386c565b23fcabc8c7384b10216de.tar.xz
samba-c3e2207cb40386c565b23fcabc8c7384b10216de.zip
r22157: Fix bug #3634 - stop nmbd segfaulting with bad interface line.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r--source/nmbd/nmbd_subnetdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/nmbd/nmbd_subnetdb.c b/source/nmbd/nmbd_subnetdb.c
index 04df3e9a4f9..4b04751235d 100644
--- a/source/nmbd/nmbd_subnetdb.c
+++ b/source/nmbd/nmbd_subnetdb.c
@@ -223,6 +223,13 @@ BOOL create_subnets(void)
return False;
}
+ /* We must have at least one subnet. */
+ if (subnetlist == NULL) {
+ DEBUG(0,("create_subnets: unable to create any subnet from "
+ "given interfaces. nmbd is terminating\n"));
+ return False;
+ }
+
if (lp_we_are_a_wins_server()) {
/* Pick the first interface ip address as the WINS server ip. */
struct in_addr *nip = iface_n_ip(0);