mirror of
https://github.com/samba-team/samba.git
synced 2025-03-07 00:58:40 +03:00
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)
This commit is contained in:
parent
e8b83d79b1
commit
3d89bad41f
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user