Browse Source

Plan 9 from Bell Labs 2005-12-14

David du Colombier 15 years ago
parent
commit
2fe38ee93a

+ 9 - 9
dist/replica/_plan9.db

@@ -52,7 +52,7 @@
 386/bin/auth/debug - 775 sys sys 1130594696 101087
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1134389855 318366
+386/bin/auth/factotum - 775 sys sys 1134505645 318360
 386/bin/auth/fgui - 775 sys sys 1132506830 218304
 386/bin/auth/guard.srv - 775 sys sys 1130594697 142873
 386/bin/auth/iam - 775 sys sys 1085076981 50791
@@ -422,7 +422,7 @@
 386/bin/test - 775 sys sys 1130594789 69885
 386/bin/time - 775 sys sys 1130594789 61418
 386/bin/tlsclient - 775 sys sys 1132418765 198498
-386/bin/tlssrv - 775 sys sys 1132418766 198736
+386/bin/tlssrv - 775 sys sys 1134505646 198760
 386/bin/togif - 775 sys sys 1131646649 189866
 386/bin/toico - 775 sys sys 1131646649 123673
 386/bin/topng - 775 sys sys 1130594792 138351
@@ -504,7 +504,7 @@
 386/bin/webcookies - 775 sys sys 1134389882 167440
 386/bin/webfs - 775 sys sys 1134389883 360008
 386/bin/webfsget - 775 sys sys 1130384374 39161
-386/bin/wikifs - 775 sys sys 1134389883 203414
+386/bin/wikifs - 775 sys sys 1134505646 203414
 386/bin/winwatch - 775 sys sys 1132418768 154910
 386/bin/xd - 775 sys sys 1130594817 64076
 386/bin/xmr - 775 sys sys 1130384375 40175
@@ -7861,9 +7861,9 @@ sys/src/9/ip/esp.c - 664 sys sys 1047260561 17084
 sys/src/9/ip/ethermedium.c - 664 sys sys 1115565973 15592
 sys/src/9/ip/gre.c - 664 sys sys 1115566178 5069
 sys/src/9/ip/icmp.c - 664 sys sys 1134390100 9496
-sys/src/9/ip/icmp6.c - 664 sys sys 1134390094 18083
+sys/src/9/ip/icmp6.c - 664 sys sys 1134498903 18054
 sys/src/9/ip/igmp.c - 664 sys sys 1055700768 5175
-sys/src/9/ip/il.c - 664 sys sys 1134390107 26923
+sys/src/9/ip/il.c - 664 sys sys 1134498903 27226
 sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
 sys/src/9/ip/ip.c - 664 sys sys 1101906449 15285
 sys/src/9/ip/ip.h - 664 sys sys 1091904429 15818
@@ -8073,7 +8073,7 @@ sys/src/9/port/devsegment.c - 664 sys sys 1131289891 9610
 sys/src/9/port/devsrv.c - 664 sys sys 1107232208 5418
 sys/src/9/port/devssl.c - 664 sys sys 1131107944 26133
 sys/src/9/port/devtinyfs.c - 664 sys sys 1015278339 15347
-sys/src/9/port/devtls.c - 664 sys sys 1086406907 45225
+sys/src/9/port/devtls.c - 664 sys sys 1134498858 45226
 sys/src/9/port/devuart.c - 664 sys sys 1102093393 12192
 sys/src/9/port/devwd.c - 664 sys sys 1126582325 2342
 sys/src/9/port/edf.c - 664 sys sys 1099760881 12742
@@ -9372,7 +9372,7 @@ sys/src/cmd/auth/factotum/rpc.c - 664 sys sys 1107633794 11167
 sys/src/cmd/auth/factotum/rsa.c - 664 sys sys 1107706104 3416
 sys/src/cmd/auth/factotum/secstore.c - 664 sys sys 1107633794 14935
 sys/src/cmd/auth/factotum/sshrsa.c - 664 sys sys 1107633793 3416
-sys/src/cmd/auth/factotum/util.c - 664 sys sys 1133553937 18036
+sys/src/cmd/auth/factotum/util.c - 664 sys sys 1134500240 18043
 sys/src/cmd/auth/factotum/wep.c - 664 sys sys 1107706104 2140
 sys/src/cmd/auth/guard.srv.c - 664 sys sys 1032497638 2334
 sys/src/cmd/auth/iam.c - 664 sys sys 1015008430 841
@@ -13029,7 +13029,7 @@ sys/src/cmd/telco/telcofax - 664 sys sys 944961289 30
 sys/src/cmd/test.c - 664 sys sys 1079372543 5409
 sys/src/cmd/time.c - 664 sys sys 1014926662 1546
 sys/src/cmd/tlsclient.c - 664 sys sys 1024375149 1631
-sys/src/cmd/tlssrv.c - 664 sys sys 1087829606 3411
+sys/src/cmd/tlssrv.c - 664 sys sys 1134498997 3426
 sys/src/cmd/touch.c - 664 sys sys 1099760670 899
 sys/src/cmd/tprof.c - 664 sys sys 1124305452 2731
 sys/src/cmd/tr.c - 664 sys sys 944961464 6008
@@ -13659,7 +13659,7 @@ sys/src/cmd/webfs/webget.c - 664 sys sys 1124711795 1589
 sys/src/cmd/webfsget.c - 664 sys sys 1068413017 1595
 sys/src/cmd/wikifs - 20000000775 sys sys 1018211094 0
 sys/src/cmd/wikifs/fs.c - 664 sys sys 1134354783 14440
-sys/src/cmd/wikifs/io.c - 664 sys sys 1084469671 11572
+sys/src/cmd/wikifs/io.c - 664 sys sys 1134498935 11573
 sys/src/cmd/wikifs/lookup.c - 664 sys sys 1018211093 182
 sys/src/cmd/wikifs/map.c - 664 sys sys 1018211093 109
 sys/src/cmd/wikifs/mkfile - 664 sys sys 1045503591 468

+ 9 - 9
dist/replica/plan9.db

@@ -52,7 +52,7 @@
 386/bin/auth/debug - 775 sys sys 1130594696 101087
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1134389855 318366
+386/bin/auth/factotum - 775 sys sys 1134505645 318360
 386/bin/auth/fgui - 775 sys sys 1132506830 218304
 386/bin/auth/guard.srv - 775 sys sys 1130594697 142873
 386/bin/auth/iam - 775 sys sys 1085076981 50791
@@ -422,7 +422,7 @@
 386/bin/test - 775 sys sys 1130594789 69885
 386/bin/time - 775 sys sys 1130594789 61418
 386/bin/tlsclient - 775 sys sys 1132418765 198498
-386/bin/tlssrv - 775 sys sys 1132418766 198736
+386/bin/tlssrv - 775 sys sys 1134505646 198760
 386/bin/togif - 775 sys sys 1131646649 189866
 386/bin/toico - 775 sys sys 1131646649 123673
 386/bin/topng - 775 sys sys 1130594792 138351
@@ -504,7 +504,7 @@
 386/bin/webcookies - 775 sys sys 1134389882 167440
 386/bin/webfs - 775 sys sys 1134389883 360008
 386/bin/webfsget - 775 sys sys 1130384374 39161
-386/bin/wikifs - 775 sys sys 1134389883 203414
+386/bin/wikifs - 775 sys sys 1134505646 203414
 386/bin/winwatch - 775 sys sys 1132418768 154910
 386/bin/xd - 775 sys sys 1130594817 64076
 386/bin/xmr - 775 sys sys 1130384375 40175
@@ -7861,9 +7861,9 @@ sys/src/9/ip/esp.c - 664 sys sys 1047260561 17084
 sys/src/9/ip/ethermedium.c - 664 sys sys 1115565973 15592
 sys/src/9/ip/gre.c - 664 sys sys 1115566178 5069
 sys/src/9/ip/icmp.c - 664 sys sys 1134390100 9496
-sys/src/9/ip/icmp6.c - 664 sys sys 1134390094 18083
+sys/src/9/ip/icmp6.c - 664 sys sys 1134498903 18054
 sys/src/9/ip/igmp.c - 664 sys sys 1055700768 5175
-sys/src/9/ip/il.c - 664 sys sys 1134390107 26923
+sys/src/9/ip/il.c - 664 sys sys 1134498903 27226
 sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
 sys/src/9/ip/ip.c - 664 sys sys 1101906449 15285
 sys/src/9/ip/ip.h - 664 sys sys 1091904429 15818
@@ -8073,7 +8073,7 @@ sys/src/9/port/devsegment.c - 664 sys sys 1131289891 9610
 sys/src/9/port/devsrv.c - 664 sys sys 1107232208 5418
 sys/src/9/port/devssl.c - 664 sys sys 1131107944 26133
 sys/src/9/port/devtinyfs.c - 664 sys sys 1015278339 15347
-sys/src/9/port/devtls.c - 664 sys sys 1086406907 45225
+sys/src/9/port/devtls.c - 664 sys sys 1134498858 45226
 sys/src/9/port/devuart.c - 664 sys sys 1102093393 12192
 sys/src/9/port/devwd.c - 664 sys sys 1126582325 2342
 sys/src/9/port/edf.c - 664 sys sys 1099760881 12742
@@ -9372,7 +9372,7 @@ sys/src/cmd/auth/factotum/rpc.c - 664 sys sys 1107633794 11167
 sys/src/cmd/auth/factotum/rsa.c - 664 sys sys 1107706104 3416
 sys/src/cmd/auth/factotum/secstore.c - 664 sys sys 1107633794 14935
 sys/src/cmd/auth/factotum/sshrsa.c - 664 sys sys 1107633793 3416
-sys/src/cmd/auth/factotum/util.c - 664 sys sys 1133553937 18036
+sys/src/cmd/auth/factotum/util.c - 664 sys sys 1134500240 18043
 sys/src/cmd/auth/factotum/wep.c - 664 sys sys 1107706104 2140
 sys/src/cmd/auth/guard.srv.c - 664 sys sys 1032497638 2334
 sys/src/cmd/auth/iam.c - 664 sys sys 1015008430 841
@@ -13029,7 +13029,7 @@ sys/src/cmd/telco/telcofax - 664 sys sys 944961289 30
 sys/src/cmd/test.c - 664 sys sys 1079372543 5409
 sys/src/cmd/time.c - 664 sys sys 1014926662 1546
 sys/src/cmd/tlsclient.c - 664 sys sys 1024375149 1631
-sys/src/cmd/tlssrv.c - 664 sys sys 1087829606 3411
+sys/src/cmd/tlssrv.c - 664 sys sys 1134498997 3426
 sys/src/cmd/touch.c - 664 sys sys 1099760670 899
 sys/src/cmd/tprof.c - 664 sys sys 1124305452 2731
 sys/src/cmd/tr.c - 664 sys sys 944961464 6008
@@ -13659,7 +13659,7 @@ sys/src/cmd/webfs/webget.c - 664 sys sys 1124711795 1589
 sys/src/cmd/webfsget.c - 664 sys sys 1068413017 1595
 sys/src/cmd/wikifs - 20000000775 sys sys 1018211094 0
 sys/src/cmd/wikifs/fs.c - 664 sys sys 1134354783 14440
-sys/src/cmd/wikifs/io.c - 664 sys sys 1084469671 11572
+sys/src/cmd/wikifs/io.c - 664 sys sys 1134498935 11573
 sys/src/cmd/wikifs/lookup.c - 664 sys sys 1018211093 182
 sys/src/cmd/wikifs/map.c - 664 sys sys 1018211093 109
 sys/src/cmd/wikifs/mkfile - 664 sys sys 1045503591 468

+ 9 - 0
dist/replica/plan9.log

@@ -23612,3 +23612,12 @@
 1134412218 0 c sys/src/9/port/sd.h - 664 sys sys 1134411408 2494
 1134426622 0 c sys/src/libmp/mkfile - 664 sys sys 1134426476 962
 1134426622 1 c sys/src/libsec/mkfile - 664 sys sys 1134426497 554
+1134500443 0 c sys/src/9/ip/icmp6.c - 664 sys sys 1134498903 18054
+1134500443 1 c sys/src/9/ip/il.c - 664 sys sys 1134498903 27226
+1134500443 2 c sys/src/9/port/devtls.c - 664 sys sys 1134498858 45226
+1134500443 3 c sys/src/cmd/auth/factotum/util.c - 664 sys sys 1134500240 18043
+1134500443 4 c sys/src/cmd/tlssrv.c - 664 sys sys 1134498997 3426
+1134500443 5 c sys/src/cmd/wikifs/io.c - 664 sys sys 1134498935 11573
+1134505845 0 c 386/bin/wikifs - 775 sys sys 1134505646 203414
+1134505845 1 c 386/bin/auth/factotum - 775 sys sys 1134505645 318360
+1134505845 2 c 386/bin/tlssrv - 775 sys sys 1134505646 198760

+ 1 - 2
sys/src/9/ip/icmp6.c

@@ -337,7 +337,7 @@ mkechoreply6(Block *bp)
  * 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 @@ icmpiput6(Proto *icmp, Ipifc *ipifc, Block *bp)
 			freeblist(bp);
 		}
 
-		ipriv->out[NbrSolicit]++;
 		break;
 
 	case NbrAdvert:

+ 17 - 2
sys/src/9/ip/il.c

@@ -70,6 +70,8 @@ enum
 
 	DefByteRate	= 100,		/* assume a megabit link */
 	DefRtt		= 50,		/* cross country on a great day */
+
+	Maxrq		= 64*1024,
 };
 
 enum
@@ -163,6 +165,7 @@ enum
 	Retrans,		/* retransmissions */
 	DupMsg,
 	DupBytes,
+	DroppedMsgs,
 
 	Nstats,
 };
@@ -178,6 +181,7 @@ static char *statnames[] =
 [Retrans]	"Retrans",
 [DupMsg]	"DupMsg",
 [DupBytes]	"DupBytes",
+[DroppedMsgs]	"DroppedMsgs",
 };
 
 typedef struct Ilpriv Ilpriv;
@@ -415,7 +419,7 @@ ilkick(void *x, Block *bp)
 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 @@ _ilprocess(Conv *s, Ilhdr *h, Block *bp)
 			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 @@ ilpullup(Conv *s)
 		bp = packblock(bp);
 		if(bp == 0)
 			panic("ilpullup2");
-		qpassnolim(s->rq, bp);
+		qpass(s->rq, bp);
 	}
 	qunlock(&ic->outo);
 }

+ 1 - 1
sys/src/9/port/devtls.c

@@ -155,7 +155,7 @@ static TlsErrs tlserrs[] = {
 	{EDecryptionFailed,		EIllegalParameter,		EDecryptionFailed,		1, "decryption failed"},
 	{ERecordOverflow,		EIllegalParameter,		ERecordOverflow,		1, "record too long"},
 	{EDecompressionFailure,	EDecompressionFailure,	EDecompressionFailure,	1, "decompression failed"},
-	{EHandshakeFailure,		EHandshakeFailure,		EHandshakeFailure,		1, "could not negotiate acceptable security paramters"},
+	{EHandshakeFailure,		EHandshakeFailure,		EHandshakeFailure,		1, "could not negotiate acceptable security parameters"},
 	{ENoCertificate,		ENoCertificate,			ECertificateUnknown,	1, "no appropriate certificate available"},
 	{EBadCertificate,		EBadCertificate,		EBadCertificate,		1, "corrupted or invalid certificate"},
 	{EUnsupportedCertificate,	EUnsupportedCertificate,	EUnsupportedCertificate,	1, "unsupported certificate type"},

+ 2 - 2
sys/src/cmd/auth/factotum/util.c

@@ -857,8 +857,7 @@ setattrs(Attr *a, Attr *b)
 					}
 					break;
 				case AttrQuery:
-					found++;
-					break;
+					goto continue2;
 				}
 			}else
 				l = &(*l)->next;
@@ -867,6 +866,7 @@ setattrs(Attr *a, Attr *b)
 			*l = _mkattr(b->type, b->name, b->val, nil);
 			setmalloctag(*l, getcallerpc(&a));
 		}
+continue2:;
 	}
 	return a;		
 }

+ 3 - 2
sys/src/cmd/tlssrv.c

@@ -96,6 +96,7 @@ reporter(char *fmt, ...)
 	}else{
 		fprint(2, "%s: %s tls reports ", argv0, remotesys);
 		vfprint(2, fmt, ap);
+		fprint(2, "\n");
 	}
 	va_end(ap);
 	return 0;
@@ -154,7 +155,7 @@ main(int argc, char *argv[])
 		fd = dumper(fd);
 	fd = tlsServer(fd, conn);
 	if(fd < 0){
-		reporter("failed: %r\n");
+		reporter("failed: %r");
 		exits(0);
 	}
 	reporter("open\n");
@@ -170,7 +171,7 @@ main(int argc, char *argv[])
 			close(p[1]);
 			close(p[0]);
 			exec(argv[0], argv);
-			reporter("can't exec %s: %r\n", argv[0]);
+			reporter("can't exec %s: %r", argv[0]);
 			_exits("exec");
 		case -1:
 			exits("fork");

+ 1 - 1
sys/src/cmd/wikifs/io.c

@@ -445,7 +445,7 @@ allocnum(char *title, int mustbenew)
 		return -1;
 	}
 
-	if(title[0]=='\0' || strpbrk(title, "/<>:")){
+	if(title[0]=='\0' || strpbrk(title, "/<>:?")){
 		werrstr("invalid character in name");
 		return -1;
 	}