git: ab3daba43e8c - stable/14 - sctp: clear the SCTP_ADDR_VALID flag when removing an address

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Wed, 21 May 2025 17:11:22 UTC
The branch stable/14 has been updated by tuexen:

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

commit ab3daba43e8cef4cf529dd1a6d2a5db7de0a66a0
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2025-05-04 22:45:01 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2025-05-21 17:11:03 +0000

    sctp: clear the SCTP_ADDR_VALID flag when removing an address
    
    This flag is currently not read, therefore the bug had no
    consequences.
    
    (cherry picked from commit 2013c4e0dc73a7c7b05f48726af1a4931686ccef)
---
 sys/netinet/sctp_pcb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c
index 7b155eed896a..44807733b9e9 100644
--- a/sys/netinet/sctp_pcb.c
+++ b/sys/netinet/sctp_pcb.c
@@ -637,7 +637,7 @@ sctp_del_addr_from_vrf(uint32_t vrf_id, struct sockaddr *addr,
 			}
 		}
 		SCTPDBG(SCTP_DEBUG_PCB4, "Deleting ifa %p\n", (void *)sctp_ifap);
-		sctp_ifap->localifa_flags &= SCTP_ADDR_VALID;
+		sctp_ifap->localifa_flags &= ~SCTP_ADDR_VALID;
 		/*
 		 * We don't set the flag. This means that the structure will
 		 * hang around in EP's that have bound specific to it until