From 83e1a68bb0bfa45d78ffd6ae787c21ad108d3771 Mon Sep 17 00:00:00 2001 From: "Matthew R. Wilson" Date: Mon, 1 Dec 2025 14:13:23 -0800 Subject: [PATCH] Hack to fix VM telnet client shortcomings --- telnet.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/telnet.go b/telnet.go index de89e96..397457c 100644 --- a/telnet.go +++ b/telnet.go @@ -360,7 +360,12 @@ func makeDeviceInfo(conn net.Conn, termtype string) (DevInfo, error) { return nil, err } if n != 1 || aid[0] != byte(aidQueryResponse) { - return nil, ErrTelnetError + // the VM telnet client responds with another Do Binary Transmission + // telnet option for some reason... too primitive to know about + // structured field queries? If we're not getting the kind of reply + // we're expecting, we'll return whatever we're already assuming. + flushConnection(conn, 50*time.Millisecond) + return &deviceInfo{24, 80, termtype, nil}, nil } // There are an arbitrary number of query reply structured fields. We are