git: e6cb445098b1 - stable/14 - sctp: initilize local address flags correctly
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 May 2025 17:10:30 UTC
The branch stable/14 has been updated by tuexen:
URL: https://cgit.FreeBSD.org/src/commit/?id=e6cb445098b156157f5b1926642ae6f86bf57f34
commit e6cb445098b156157f5b1926642ae6f86bf57f34
Author: Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-05-04 22:41:49 +0000
Commit: Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-05-21 17:10:09 +0000
sctp: initilize local address flags correctly
Use the same routine for initilizing as for updating.
(cherry picked from commit 6ab4b0c0df57775fd6c288a0b7d0f5d2cad73481)
---
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 b0686180a7af..7b155eed896a 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