commit 8a7bfb26837767a4bdbb34cedceb10f750d38d3c from: Thomas Leonard date: Fri Feb 05 16:44:54 2016 UTC Always negotiate a compatible protocol version Previously, if the client suggested a newer version then we gave up. Now, we offer to drop back to 9P2000. Signed-off-by: Thomas Leonard commit - 256e7ade568bd33160656b099f53752f08ed01d1 commit + 8a7bfb26837767a4bdbb34cedceb10f750d38d3c blob - ac20fb9dfd45e42713513aee43a5ad975d41c0cc blob + ee72e88d1e2a28e9e88d02d690de78d79ef3d246 --- version.go +++ version.go @@ -80,9 +80,15 @@ func servernegotiate(ctx context.Context, ch Channel, if mv.Version != version { // TODO(stevvooe): Not the best place to do version handling. We need // to have a way to pass supported versions into this method then have - // it return the actual version. For now, respond with unknown for + // it return the actual version. For now, respond with 9P2000 for // anything that doesn't match the provided version string. - respmsg.Version = "unknown" + // + // version(9) says "The server may respond with the client’s + // version string, or a version string identifying an earlier + // defined protocol version. Currently, the only defined + // version is the 6 characters 9P2000." Therefore, it is always + // OK to respond with this. + respmsg.Version = "9P2000" } if int(mv.MSize) < ch.MSize() {