The branch stable/15 has been updated by jhb:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ec70458815ef5ccb3ef0b0abba2148192c8852fe

commit ec70458815ef5ccb3ef0b0abba2148192c8852fe
Author:     Ken J. Thomson <[email protected]>
AuthorDate: 2026-04-23 19:15:48 +0000
Commit:     John Baldwin <[email protected]>
CommitDate: 2026-06-23 16:05:49 +0000

    ctld: Don't add an iscsi port for targets with only kernel ports
    
    PR:             293076
    Reviewed by:    asomers
    Fixes:          969876fcee57 ("ctld: parse config file independently of 
getting kernel info")
    Differential Revision:  https://reviews.freebsd.org/D56523
    (cherry picked from commit 614ef718496eb6fd815ddcfde203bee8da1178b1)
---
 usr.sbin/ctld/ctld.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc
index 8fdb3824bcf7..6cb4599a6ca8 100644
--- a/usr.sbin/ctld/ctld.cc
+++ b/usr.sbin/ctld/ctld.cc
@@ -1476,7 +1476,7 @@ target::verify()
                t_auth_group = t_conf->find_auth_group("default");
                assert(t_auth_group != nullptr);
        }
-       if (t_ports.empty()) {
+       if (t_ports.empty() && t_pports.empty()) {
                struct portal_group *pg = default_portal_group();
                assert(pg != NULL);
                t_conf->add_port(this, pg, nullptr);

Reply via email to