diff options
author | ume <ume@FreeBSD.org> | 2001-06-20 12:32:48 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2001-06-20 12:32:48 +0000 |
commit | 7ffe6c47e5d91237fa5f4bff8f3f93ef6ee84d06 (patch) | |
tree | c85ce8f39db2e14c4c8a8dc6e119f1e601237a20 /sys/netinet/tcp_subr.c | |
parent | fcb8a3a2e689c0a1aa317b24fc10b7e3b42fa1d4 (diff) | |
download | FreeBSD-src-7ffe6c47e5d91237fa5f4bff8f3f93ef6ee84d06.zip FreeBSD-src-7ffe6c47e5d91237fa5f4bff8f3f93ef6ee84d06.tar.gz |
made sure to use the correct sa_len for rtalloc().
sizeof(ro_dst) is not necessarily the correct one.
this change would also fix the recent path MTU discovery problem for the
destination of an incoming TCP connection.
Submitted by: JINMEI Tatuya <jinmei@kame.net>
Obtained from: KAME
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 06849be..2782f70 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1287,7 +1287,7 @@ tcp_rtlookup(inp) /* No route yet, so try to acquire one */ if (inp->inp_faddr.s_addr != INADDR_ANY) { ro->ro_dst.sa_family = AF_INET; - ro->ro_dst.sa_len = sizeof(ro->ro_dst); + ro->ro_dst.sa_len = sizeof(struct sockaddr_in); ((struct sockaddr_in *) &ro->ro_dst)->sin_addr = inp->inp_faddr; rtalloc(ro); @@ -1314,7 +1314,7 @@ tcp_rtlookup6(inp) dst6 = (struct sockaddr_in6 *)&ro6->ro_dst; dst6->sin6_family = AF_INET6; - dst6->sin6_len = sizeof(ro6->ro_dst); + dst6->sin6_len = sizeof(*dst6); dst6->sin6_addr = inp->in6p_faddr; rtalloc((struct route *)ro6); rt = ro6->ro_rt; |