The branch stable/14 has been updated by zlei:

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

commit 99d4e2870c03ce86855fa2edab2fe9af0d3ff410
Author:     Zhenlei Huang <z...@freebsd.org>
AuthorDate: 2025-06-24 10:01:18 +0000
Commit:     Zhenlei Huang <z...@freebsd.org>
CommitDate: 2025-07-07 10:05:10 +0000

    ifnet: Eliminate unnecessary synchronization of the interface index in the 
link layer address
    
    Change 80e60e236d85 made the if_index global, and for the whole lifecycle
    of an interface its index never changes, then there is no need to
    synchronize the interface index in the link layer address when moving
    interfaces from one vnet to another.
    
    No functional change intended.
    
    Reviewed by:    glebius
    Fixes:          80e60e236d85 ifnet: make if_index global
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D50975
    
    (cherry picked from commit 0b4c4833ee3eab0ce46b3bdbf054bca4b6bb7429)
---
 sys/net/if.c | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/sys/net/if.c b/sys/net/if.c
index a0570aed32e9..39854489f5f7 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -932,21 +932,6 @@ if_attach_internal(struct ifnet *ifp, bool vmove)
                }
 #endif
        }
-#ifdef VIMAGE
-       else {
-               /*
-                * Update the interface index in the link layer address
-                * of the interface.
-                */
-               for (ifa = ifp->if_addr; ifa != NULL;
-                   ifa = CK_STAILQ_NEXT(ifa, ifa_link)) {
-                       if (ifa->ifa_addr->sa_family == AF_LINK) {
-                               sdl = (struct sockaddr_dl *)ifa->ifa_addr;
-                               sdl->sdl_index = ifp->if_index;
-                       }
-               }
-       }
-#endif
 
        if (domain_init_status >= 2)
                if_attachdomain1(ifp);

Reply via email to