I've been running with these changes for a long time. The change to icmp6.c just corrects packet counts. The changes to il.c were jmk's suggestion to avoid exhausting the supply of rpc mount buffers. Reference: /n/sources/patch/applied/ip-fixes Date: Tue Dec 13 03:29:20 CET 2005 --- /sys/src/9/ip/icmp6.c Tue Dec 13 03:27:22 2005 +++ /sys/src/9/ip/icmp6.c Tue Dec 13 03:27:18 2005 @@ -337,7 +337,7 @@ * sends out an ICMPv6 neighbor solicitation * suni == SRC_UNSPEC or SRC_UNI, * tuni == TARG_MULTI => multicast for address resolution, - * and tflag == TARG_UNI => neighbor reachability. + * and tuni == TARG_UNI => neighbor reachability. */ extern void @@ -831,7 +831,6 @@ freeblist(bp); } - ipriv->out[NbrSolicit]++; break; case NbrAdvert: --- /sys/src/9/ip/il.c Tue Dec 13 03:27:37 2005 +++ /sys/src/9/ip/il.c Tue Dec 13 03:27:32 2005 @@ -70,6 +70,8 @@ DefByteRate = 100, /* assume a megabit link */ DefRtt = 50, /* cross country on a great day */ + + Maxrq = 64*1024, }; enum @@ -163,6 +165,7 @@ Retrans, /* retransmissions */ DupMsg, DupBytes, + DroppedMsgs, Nstats, }; @@ -178,6 +181,7 @@ [Retrans] "Retrans", [DupMsg] "DupMsg", [DupBytes] "DupBytes", +[DroppedMsgs] "DroppedMsgs", }; typedef struct Ilpriv Ilpriv; @@ -415,7 +419,7 @@ static void ilcreate(Conv *c) { - c->rq = qopen(64*1024, 0, 0, c); + c->rq = qopen(Maxrq, 0, 0, c); c->wq = qbypass(ilkick, c); } @@ -722,6 +726,17 @@ freeblist(bp); break; case Ildata: + /* + * avoid consuming all the mount rpc buffers in the + * system. if the input queue is too long, drop this + * packet. + */ + if (s->rq && qlen(s->rq) >= Maxrq) { + priv->stats[DroppedMsgs]++; + freeblist(bp); + break; + } + ilackto(ic, ack, bp); iloutoforder(s, h, bp); ilpullup(s); @@ -912,7 +927,7 @@ bp = packblock(bp); if(bp == 0) panic("ilpullup2"); - qpassnolim(s->rq, bp); + qpass(s->rq, bp); } qunlock(&ic->outo); }