Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151012289
D1982.id4019.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D1982.id4019.diff
View Options
Index: sys/netinet/tcp_usrreq.c
===================================================================
--- sys/netinet/tcp_usrreq.c
+++ sys/netinet/tcp_usrreq.c
@@ -460,8 +461,12 @@
inp = sotoinpcb(so);
KASSERT(inp != NULL, ("tcp_usr_connect: inp == NULL"));
INP_WLOCK(inp);
- if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
- error = EINVAL;
+ if (inp->inp_flags & (INP_TIMEWAIT)) {
+ error = EADDRINUSE;
+ goto out;
+ }
+ if (inp->inp_flags & (INP_DROPPED)) {
+ error = ECONNREFUSED;
goto out;
}
tp = intotcpcb(inp);
@@ -507,8 +512,12 @@
inp = sotoinpcb(so);
KASSERT(inp != NULL, ("tcp6_usr_connect: inp == NULL"));
INP_WLOCK(inp);
- if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
- error = EINVAL;
+ if (inp->inp_flags & (INP_TIMEWAIT)) {
+ error = EADDRINUSE;
+ goto out;
+ }
+ if (inp->inp_flags & (INP_DROPPED)) {
+ error = ECONNREFUSED;
goto out;
}
tp = intotcpcb(inp);
@@ -730,7 +739,7 @@
KASSERT(inp != NULL, ("inp == NULL"));
INP_WLOCK(inp);
if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
- error = ECONNRESET;
+ error = ENOTCONN;
goto out;
}
tp = intotcpcb(inp);
@@ -763,7 +772,7 @@
KASSERT(inp != NULL, ("tcp_usr_rcvd: inp == NULL"));
INP_WLOCK(inp);
if (inp->inp_flags & (INP_TIMEWAIT | INP_DROPPED)) {
- error = ECONNRESET;
+ error = ENOTCONN;
goto out;
}
tp = intotcpcb(inp);
@@ -814,7 +823,7 @@
m_freem(control);
if (m)
m_freem(m);
- error = ECONNRESET;
+ error = ENOTCONN;
goto out;
}
#ifdef INET6
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 6, 11:11 AM (10 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30963020
Default Alt Text
D1982.id4019.diff (1 KB)
Attached To
Mode
D1982: Fix return errors in tcp_usrreq.c
Attached
Detach File
Event Timeline
Log In to Comment