summaryrefslogtreecommitdiff
path: root/source3
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
commitd1ec6909727698f94c3c0228797a1d070dc17fa1 (patch)
tree003521d35a38461003e8346b5df9be68868cc930 /source3
parente5428ef1895928366aeaf84eed7a83c5fc5384ce (diff)
downloadsamba-d1ec6909727698f94c3c0228797a1d070dc17fa1.tar.gz
samba-d1ec6909727698f94c3c0228797a1d070dc17fa1.tar.bz2
samba-d1ec6909727698f94c3c0228797a1d070dc17fa1.zip
r22157: Fix bug #3634 - stop nmbd segfaulting with bad interface line.
Jeremy. (This used to be commit c3e2207cb40386c565b23fcabc8c7384b10216de)
Diffstat (limited to 'source3')
-rw-r--r--source3/nmbd/nmbd_subnetdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source3/nmbd/nmbd_subnetdb.c b/source3/nmbd/nmbd_subnetdb.c
index 04df3e9a4f..4b04751235 100644
--- a/source3/nmbd/nmbd_subnetdb.c
+++ b/source3/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);