Module Name: src Committed By: christos Date: Tue Dec 11 14:38:46 UTC 2018
Modified Files: src/sys/netinet: sctp_pcb.c Log Message: PR/53775: Havard Eidnes: bind(2) may inaccurately return EADDRNOTAVAIL, it should return EADDRINUSE. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/netinet/sctp_pcb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/netinet/sctp_pcb.c diff -u src/sys/netinet/sctp_pcb.c:1.17 src/sys/netinet/sctp_pcb.c:1.18 --- src/sys/netinet/sctp_pcb.c:1.17 Mon Sep 3 12:29:36 2018 +++ src/sys/netinet/sctp_pcb.c Tue Dec 11 09:38:45 2018 @@ -1,5 +1,5 @@ /* $KAME: sctp_pcb.c,v 1.39 2005/06/16 18:29:25 jinmei Exp $ */ -/* $NetBSD: sctp_pcb.c,v 1.17 2018/09/03 16:29:36 riastradh Exp $ */ +/* $NetBSD: sctp_pcb.c,v 1.18 2018/12/11 14:38:45 christos Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc. @@ -33,7 +33,7 @@ * SUCH DAMAGE. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sctp_pcb.c,v 1.17 2018/09/03 16:29:36 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sctp_pcb.c,v 1.18 2018/12/11 14:38:45 christos Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1763,7 +1763,7 @@ sctp_inpcb_bind(struct socket *so, struc /* unlock info */ SCTP_INP_INFO_WUNLOCK(); - return (EADDRNOTAVAIL); + return EADDRINUSE; } SCTP_INP_WLOCK(inp); if (bindall) { @@ -1773,7 +1773,7 @@ sctp_inpcb_bind(struct socket *so, struc SCTP_INP_DECR_REF(inp); SCTP_INP_WUNLOCK(inp); SCTP_INP_INFO_WUNLOCK(); - return (EADDRNOTAVAIL); + return EADDRINUSE; } } } else {