From: Ralph Boehme Date: Mon, 10 Mar 2025 13:29:23 +0000 (+0100) Subject: s3/lib: fix matching interfaces with multiple assigned IPs X-Git-Tag: samba-4.22.1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b38c179898e4279dabb0ce88a099759c01543dea;p=thirdparty%2Fsamba.git s3/lib: fix matching interfaces with multiple assigned IPs BUG: https://bugzilla.samba.org/show_bug.cgi?id=15823 Signed-off-by: Ralph Boehme Reviewed-by: Björn Jacke Reviewed-by: Martin Schwenke Autobuild-User(master): Martin Schwenke Autobuild-Date(master): Wed Mar 12 01:32:30 UTC 2025 on atb-devel-224 (cherry picked from commit b85f056e7312ea9839b6fda617132fcc956da3c1) --- diff --git a/source3/lib/interface.c b/source3/lib/interface.c index 032362b4da3..5f351999e41 100644 --- a/source3/lib/interface.c +++ b/source3/lib/interface.c @@ -624,9 +624,12 @@ static void interpret_interface(char *token) } add_interface(&probed_ifaces[i]); probed_ifaces[i].netmask = saved_mask; - return; + added = true; } } + if (added) { + return; + } DEBUG(2,("interpret_interface: Can't determine ip for " "broadcast address %s\n", token));