Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150578887
D38391.id116738.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
D38391.id116738.diff
View Options
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -870,7 +870,6 @@
}
if (sc->sc_inc.inc_flags & INC_ISIPV6) {
- struct in6_addr laddr6;
struct sockaddr_in6 sin6;
sin6.sin6_family = AF_INET6;
@@ -878,16 +877,11 @@
sin6.sin6_addr = sc->sc_inc.inc6_faddr;
sin6.sin6_port = sc->sc_inc.inc_fport;
sin6.sin6_flowinfo = sin6.sin6_scope_id = 0;
- laddr6 = inp->in6p_laddr;
- if (IN6_IS_ADDR_UNSPECIFIED(&inp->in6p_laddr))
- inp->in6p_laddr = sc->sc_inc.inc6_laddr;
INP_HASH_WLOCK(&V_tcbinfo);
error = in6_pcbconnect(inp, &sin6, thread0.td_ucred, false);
INP_HASH_WUNLOCK(&V_tcbinfo);
- if (error != 0) {
- inp->in6p_laddr = laddr6;
+ if (error != 0)
goto abort;
- }
/* Override flowlabel from in6_pcbconnect. */
inp->inp_flow &= ~IPV6_FLOWLABEL_MASK;
inp->inp_flow |= sc->sc_flowlabel;
@@ -898,7 +892,6 @@
#endif
#ifdef INET
{
- struct in_addr laddr;
struct sockaddr_in sin;
inp->inp_options = (m) ? ip_srcroute(m) : NULL;
@@ -913,16 +906,11 @@
sin.sin_addr = sc->sc_inc.inc_faddr;
sin.sin_port = sc->sc_inc.inc_fport;
bzero((caddr_t)sin.sin_zero, sizeof(sin.sin_zero));
- laddr = inp->inp_laddr;
- if (inp->inp_laddr.s_addr == INADDR_ANY)
- inp->inp_laddr = sc->sc_inc.inc_laddr;
INP_HASH_WLOCK(&V_tcbinfo);
error = in_pcbconnect(inp, &sin, thread0.td_ucred, false);
INP_HASH_WUNLOCK(&V_tcbinfo);
- if (error != 0) {
- inp->inp_laddr = laddr;
+ if (error != 0)
goto abort;
- }
}
#endif /* INET */
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 3, 1:26 PM (7 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30759175
Default Alt Text
D38391.id116738.diff (1 KB)
Attached To
Mode
D38391: tcp: Remove a couple of always-false checks from syncache_socket()
Attached
Detach File
Event Timeline
Log In to Comment