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.21.5~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d9998a528bfb6b87650964035af23bc1fa32e77;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) Autobuild-User(v4-21-test): Jule Anger Autobuild-Date(v4-21-test): Thu Mar 20 14:50:08 UTC 2025 on atb-devel-224 --- 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));