diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 06:51:12 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1995-12-14 06:51:12 +0000 |
commit | 4999ff4b43ac2d7fd722821f43575a2d6e6d8798 (patch) | |
tree | a59013a98998bd12d51ac3c8c38d676f02b6a99d /sys/netiso | |
parent | a2d742ba04b0e50a993d51980923004ca0f3efde (diff) |
from netbsd:
make netinet work on systems where pointers and longs are 64 bits
(like the alpha). Biggest problem: IP headers were overlayed with
structure which included pointers, and which therefore didn't overlay
properly on 64-bit machines. Solution: instead of threading pointers
through IP header overlays, add a "queue element" structure to do
the threading, and point it at the ip headers.
Diffstat (limited to 'sys/netiso')
-rw-r--r-- | sys/netiso/tuba_subr.c | 6 | ||||
-rw-r--r-- | sys/netiso/tuba_table.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/netiso/tuba_subr.c b/sys/netiso/tuba_subr.c index 465af6293db..927fea34a12 100644 --- a/sys/netiso/tuba_subr.c +++ b/sys/netiso/tuba_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: tuba_subr.c,v 1.4 1995/06/13 07:58:24 mycroft Exp $ */ +/* $NetBSD: tuba_subr.c,v 1.5 1995/11/21 01:07:54 cgd Exp $ */ /* * Copyright (c) 1992, 1993 @@ -326,8 +326,8 @@ tuba_tcpinput(m, src, dst) ti->ti_src.s_addr = tuba_table[findex]->tc_sum; else ti->ti_src.s_addr = tuba_table[findex]->tc_ssum; - ti->ti_prev = ti->ti_next = 0; - ti->ti_x1 = 0; ti->ti_pr = ISOPROTO_TCP; + bzero(ti->ti_x1, sizeof ti->ti_x1); + ti->ti_pr = ISOPROTO_TCP; ti->ti_len = htons((u_short)tlen); if (ti->ti_sum = in_cksum(m, m->m_pkthdr.len)) { tcpstat.tcps_rcvbadsum++; diff --git a/sys/netiso/tuba_table.c b/sys/netiso/tuba_table.c index 1f87ef60ad4..e9663a13539 100644 --- a/sys/netiso/tuba_table.c +++ b/sys/netiso/tuba_table.c @@ -1,4 +1,4 @@ -/* $NetBSD: tuba_table.c,v 1.4 1995/08/12 23:59:53 mycroft Exp $ */ +/* $NetBSD: tuba_table.c,v 1.5 1995/10/16 05:28:58 mycroft Exp $ */ /* * Copyright (c) 1992, 1993 @@ -91,7 +91,7 @@ tuba_lookup(siso, wait) struct tuba_cache **new; int dupentry = 0, sum_a = 0, sum_b = 0, old_size, i; - if ((rn = rn_match((caddr_t)&siso->siso_addr, tuba_tree->rnh_treetop)) + if ((rn = rn_match((caddr_t)&siso->siso_addr, tuba_tree)) && ((rn->rn_flags & RNF_ROOT) == 0)) { tc = (struct tuba_cache *)rn; tc->tc_time = time.tv_sec; |