M port/devip.c => port/devip.c +2 -0
@@ 429,6 429,8 @@ udpstoput(Queue *q, Block *bp)
ptcllen = dlen + (UDP_HDRSIZE-UDP_PHDRSIZE);
uh->Unused = 0;
uh->udpproto = IP_UDPPROTO;
+ uh->frag[0] = 0;
+ uh->frag[1] = 0;
hnputs(uh->udpplen, ptcllen);
hnputl(uh->udpdst, ipc->dst);
hnputl(uh->udpsrc, Myip);
M port/stil.c => port/stil.c +5 -3
@@ 152,6 152,8 @@ iloput(Queue *q, Block *bp)
ih = (Ilhdr *)(bp->rptr);
/* Ip fields */
+ ih->frag[0] = 0;
+ ih->frag[1] = 0;
hnputl(ih->src, Myip);
hnputl(ih->dst, ipc->dst);
ih->proto = IP_ILPROTO;
@@ 292,7 294,7 @@ ilrcvmsg(Ipconv *ipc, Block *bp)
ic = &new->ilctl;
ic->state = Ilsyncee;
initseq += TK2MS(MACHP(0)->ticks);
- ic->start = initseq;
+ ic->start = initseq & 0xffffff;
ic->next = ic->start+1;
ic->recvd = 0;
ic->rstart = nhgetl(ih->ilid);
@@ 467,7 469,7 @@ _ilprocess(Ipconv *s, Ilhdr *h, Block *bp)
void
ilrexmit(Ilcb *ic)
{
- Block *nb;
+ Block *nb, *bp;
Ilhdr *h;
nb = 0;
@@ 750,7 752,7 @@ ilstart(Ipconv *ipc, int type, int window)
initseq += TK2MS(MACHP(0)->ticks);
- ic->start = initseq;
+ ic->start = initseq & 0xffffff;
ic->next = ic->start+1;
ic->recvd = 0;
ic->window = window;
M port/tcpinput.c => port/tcpinput.c +6 -0
@@ 798,6 798,8 @@ copyb(Block *bp, int count)
memmove(nb->wptr, bp->rptr, l);
nb->wptr += l;
count -= l;
+ if(bp->flags & S_DELIM)
+ nb->flags |= S_DELIM;
*p = nb;
p = &nb->next;
bp = bp->next;
@@ 810,10 812,12 @@ copyb(Block *bp, int count)
panic("copyb.2");
memset(nb->wptr, 0, count);
nb->wptr += count;
+ nb->flags |= S_DELIM;
*p = nb;
}
if(blen(head) == 0)
print("copyb: zero length\n");
+
return head;
}
@@ 964,6 968,8 @@ htontcp(Tcp *tcph, Block *data, Tcphdr *ph)
h = (Tcphdr *)(data->rptr);
h->proto = IP_TCPPROTO;
+ h->frag[0] = 0;
+ h->frag[1] = 0;
hnputs(h->tcplen, hdrlen + dlen);
hnputs(h->tcpsport, tcph->source);
hnputs(h->tcpdport, tcph->dest);
M power/mmu.c => power/mmu.c +1 -3
@@ 156,9 156,7 @@ void
flushmmu(void)
{
splhi();
- /* easiest is to forget what pid we had.... */
- memset(u->p->pidonmach, 0, sizeof u->p->pidonmach);
- /* ....then get a new one by trying to map our stack */
+ u->p->newtlb = 1;
mapstack(u->p);
spllo();
}