From 79952cd7649b63fa312ecafcffb719f5060929d4 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Mon, 5 May 2025 00:20:40 +0200 Subject: [PATCH] sctp: report address unavailability consistently When binding to an address, which is not available, use consistently EADDRNOTAVAIL. MFC after: 3 days --- 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 1a8a514fbf5..9c9dd0cf346 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -3050,7 +3050,7 @@ continue_anyway: /* GAK, more FIXME IFA lock? */ if (ifa->localifa_flags & SCTP_ADDR_IFA_UNUSEABLE) { /* Can't bind a non-existent addr. */ - error = EINVAL; + error = EADDRNOTAVAIL; SCTP_LTRACE_ERR_RET(inp, NULL, NULL, SCTP_FROM_SCTP_PCB, error); goto out; }