summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_hostcache.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2003-12-02 21:25:12 +0000
committerandre <andre@FreeBSD.org>2003-12-02 21:25:12 +0000
commitd0ffd0a2401423af0af170a3e3f3178d5e23773d (patch)
treee68329ea18cb849f3782f2daf6031839e63a9539 /sys/netinet/tcp_hostcache.c
parent76b226be4b1406723efb1c34ac995df3dd8c1a8f (diff)
downloadFreeBSD-src-d0ffd0a2401423af0af170a3e3f3178d5e23773d.zip
FreeBSD-src-d0ffd0a2401423af0af170a3e3f3178d5e23773d.tar.gz
Swap destination and source arguments of two bcopy() calls.
Before committing the initial tcp_hostcache I changed them from memcpy() to conform with FreeBSD style without realizing the difference in argument definition. This fixes hostcache operation for IPv6 (in general and explicitly IPv6 path mtu discovery) and T/TCP (RFC1644). Submitted by: Taku YAMAMOTO <taku@cent.saitama-u.ac.jp> Approved by: re (rwatson)
Diffstat (limited to 'sys/netinet/tcp_hostcache.c')
-rw-r--r--sys/netinet/tcp_hostcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 52f573f..ed7f9da 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -377,7 +377,7 @@ tcp_hc_insert(struct in_conninfo *inc)
*/
bzero(hc_entry, sizeof(*hc_entry));
if (inc->inc_isipv6)
- bcopy(&hc_entry->ip6, &inc->inc6_faddr, sizeof(hc_entry->ip6));
+ bcopy(&inc->inc6_faddr, &hc_entry->ip6, sizeof(hc_entry->ip6));
else
hc_entry->ip4 = inc->inc_faddr;
hc_entry->rmx_head = hc_head;
@@ -474,7 +474,7 @@ tcp_hc_gettao(struct in_conninfo *inc, struct rmxp_tao *tao)
hc_entry->rmx_hits++;
hc_entry->rmx_expire = tcp_hostcache.expire; /* start over again */
- bcopy(tao, &hc_entry->rmx_tao, sizeof(*tao));
+ bcopy(&hc_entry->rmx_tao, tao, sizeof(*tao));
THC_UNLOCK(&hc_entry->rmx_head->hch_mtx);
}
OpenPOWER on IntegriCloud