From 664922f301a2335564a0efaaa0b4453b00534ef7 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Mon, 14 Oct 2002 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2002-10-14 --- ip/icmp.c | 4 ++-- port/qio.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ip/icmp.c b/ip/icmp.c index 0d8dd50cdeb5f4ba590614de2626ce1c6ca7a781..52e2a65446c092cd5682e557c8b8abf7d4cec93a 100644 --- a/ip/icmp.c +++ b/ip/icmp.c @@ -195,12 +195,12 @@ icmpttlexceeded(Fs *f, uchar *ia, Block *bp) Icmp *p, *np; p = (Icmp *)bp->rp; - p->vihl = IP_VER4; netlog(f, Logicmp, "sending icmpttlexceeded -> %V\n", p->src); nbp = allocb(ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8); nbp->wp += ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8; np = (Icmp *)nbp->rp; + np->vihl = IP_VER4; memmove(np->dst, p->src, sizeof(np->dst)); v6tov4(np->src, ia); memmove(np->data, bp->rp, ICMP_IPSIZE + 8); @@ -224,7 +224,6 @@ icmpnoconv(Fs *f, Block *bp) uchar addr[IPaddrlen]; p = (Icmp *)bp->rp; - p->vihl = IP_VER4; /* only do this for unicast sources and destinations */ v4tov6(addr, p->dst); @@ -240,6 +239,7 @@ icmpnoconv(Fs *f, Block *bp) nbp = allocb(ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8); nbp->wp += ICMP_IPSIZE + ICMP_HDRSIZE + ICMP_IPSIZE + 8; np = (Icmp *)nbp->rp; + np->vihl = IP_VER4; memmove(np->dst, p->src, sizeof(np->dst)); memmove(np->src, p->dst, sizeof(np->src)); memmove(np->data, bp->rp, ICMP_IPSIZE + 8); diff --git a/port/qio.c b/port/qio.c index 6346cc0265319c65183e545b43e7a2d18ebd2a58..f2aea8bdaa532a22dcbbc7d6bb98ee312c42ff14 100644 --- a/port/qio.c +++ b/port/qio.c @@ -484,6 +484,7 @@ qdiscard(Queue *q, int len) return sofar; } +#ifdef sape /* * Return length that next qconsume will return */ @@ -522,6 +523,7 @@ qblen(Queue *q) return len; } +#endif sape /* * Interrupt level copy out of a queue, return # bytes copied.