From d1ec6909727698f94c3c0228797a1d070dc17fa1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 10 Apr 2007 20:35:30 +0000 Subject: r22157: Fix bug #3634 - stop nmbd segfaulting with bad interface line. Jeremy. (This used to be commit c3e2207cb40386c565b23fcabc8c7384b10216de) --- source3/nmbd/nmbd_subnetdb.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3') 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); -- cgit