sctp: report address unavailability consistently

When binding to an address, which is not available, use
consistently EADDRNOTAVAIL.

MFC after:	3 days
This commit is contained in:
Michael Tuexen 2025-05-05 00:20:40 +02:00
parent 38eb41a389
commit 79952cd764

View file

@ -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;
}