git: 6ab4b0c0df57 - main - sctp: initilize local address flags correctly
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 04 May 2025 22:42:57 UTC
The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=6ab4b0c0df57775fd6c288a0b7d0f5d2cad73481 commit 6ab4b0c0df57775fd6c288a0b7d0f5d2cad73481 Author: Michael Tuexen <tuexen@FreeBSD.org> AuthorDate: 2025-05-04 22:41:49 +0000 Commit: Michael Tuexen <tuexen@FreeBSD.org> CommitDate: 2025-05-04 22:41:49 +0000 sctp: initilize local address flags correctly Use the same routine for initilizing as for updating. MFC after: 3 days --- sys/netinet/sctp_pcb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 9c9dd0cf3462..13d3b0a332f9 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -453,6 +453,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, SCTPDBG(SCTP_DEBUG_PCB4, "Clearing deleted ifa flag\n"); sctp_ifap->localifa_flags = SCTP_ADDR_VALID; + sctp_gather_internal_ifa_flags(sctp_ifap); sctp_ifap->ifn_p = sctp_ifnp; atomic_add_int(&sctp_ifap->ifn_p->refcount, 1); } @@ -475,6 +476,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, } else { /* Repair ifn_p, which was NULL... */ sctp_ifap->localifa_flags = SCTP_ADDR_VALID; + sctp_gather_internal_ifa_flags(sctp_ifap); SCTPDBG(SCTP_DEBUG_PCB4, "Repairing ifn %p for ifa %p\n", (void *)sctp_ifnp, (void *)sctp_ifap); @@ -499,7 +501,7 @@ sctp_add_addr_to_vrf(uint32_t vrf_id, void *ifn, uint32_t ifn_index, sctp_ifap->ifa = ifa; memcpy(&sctp_ifap->address, addr, addr->sa_len); sctp_ifap->localifa_flags = SCTP_ADDR_VALID | SCTP_ADDR_DEFER_USE; - sctp_ifap->flags = ifa_flags; + sctp_gather_internal_ifa_flags(sctp_ifap); /* Set scope */ switch (sctp_ifap->address.sa.sa_family) { #ifdef INET