diff options
author | Volker Lendecke <vl@sernet.de> | 2007-10-13 16:27:52 +0200 |
---|---|---|
committer | Volker Lendecke <vl@sernet.de> | 2007-10-13 21:44:58 +0200 |
commit | 3d89bad41f64906f42616b50170f3471003139f7 (patch) | |
tree | 8afefa1fa6fc0535d31b063b4a87d5bf9999301a /source3/lib | |
parent | e8b83d79b129c4928220dee2b191e175172341f6 (diff) | |
download | samba-3d89bad41f64906f42616b50170f3471003139f7.tar.gz samba-3d89bad41f64906f42616b50170f3471003139f7.tar.bz2 samba-3d89bad41f64906f42616b50170f3471003139f7.zip |
Fix a segfault with an unknown interface
"interfaces = foo" with "foo" not being a known interface segfaulted for me.
(This used to be commit 556c33702ce6d6c7cde43ddfe965c78ebc2963d3)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/interface.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 1471a06f46..2eaadab0ec 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -460,7 +460,13 @@ static void interpret_interface(char *token) /* maybe it is a DNS name */ p = strchr_m(token,'/'); - if (!p && interpret_string_addr(&ss, token)) { + if (p == NULL) { + if (!interpret_string_addr(&ss, token)) { + DEBUG(2, ("interpret_interface: Can't find address " + "for %s\n", token)); + return; + } + for (i=0;i<total_probed;i++) { if (addr_equal(&ss, &probed_ifaces[i].ip)) { add_interface(&probed_ifaces[i]); |