Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet PR/53775: Havard Eidnes: bind(2) may inaccuratel...



details:   https://anonhg.NetBSD.org/src/rev/13f7fefba79f
branches:  trunk
changeset: 446577:13f7fefba79f
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Dec 11 14:38:45 2018 +0000

description:
PR/53775: Havard Eidnes: bind(2) may inaccurately return EADDRNOTAVAIL,
it should return EADDRINUSE.

diffstat:

 sys/netinet/sctp_pcb.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 1abe006a0c80 -r 13f7fefba79f sys/netinet/sctp_pcb.c
--- a/sys/netinet/sctp_pcb.c    Tue Dec 11 14:04:15 2018 +0000
+++ b/sys/netinet/sctp_pcb.c    Tue Dec 11 14:38:45 2018 +0000
@@ -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 @@
 
                        /* unlock info */
                        SCTP_INP_INFO_WUNLOCK();
-                       return (EADDRNOTAVAIL);
+                       return EADDRINUSE;
                }
                SCTP_INP_WLOCK(inp);
                if (bindall) {
@@ -1773,7 +1773,7 @@
                                SCTP_INP_DECR_REF(inp);
                                SCTP_INP_WUNLOCK(inp);
                                SCTP_INP_INFO_WUNLOCK();
-                               return (EADDRNOTAVAIL);
+                               return EADDRINUSE;
                        }
                }
        } else {



Home | Main Index | Thread Index | Old Index