diff options
author | Emmanuel Thomé <Emmanuel.Thome@inria.fr> | 2013-01-11 10:55:58 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2013-01-11 12:15:00 +0100 |
commit | 6d5a429ab96363aeeb9a91a5ab8fddddf14e2aaa (patch) | |
tree | 6775ecf8b60da49a225a81914d89a7541e99b071 | |
parent | a7652350f2ce5b02a0a8a6d58ce81a9788c80685 (diff) | |
download | amtterm-6d5a429ab96363aeeb9a91a5ab8fddddf14e2aaa.tar.gz |
Support code 0x29 encountered in redirection.
-rw-r--r-- | RedirectionConstants.h | 4 | ||||
-rw-r--r-- | redir.c | 18 |
2 files changed, 22 insertions, 0 deletions
diff --git a/RedirectionConstants.h b/RedirectionConstants.h index 994f04e..8a7040c 100644 --- a/RedirectionConstants.h +++ b/RedirectionConstants.h @@ -24,6 +24,10 @@ #define SOL_KEEP_ALIVE_PING 0x24 //Console to Host
#define SOL_KEEP_ALIVE_PONG 0x25 //Host to Console
#define SOL_DATA_TO_HOST 0x28 //Console to host
+
+#define SOL_0x29 0x29 // encountered in the wild
+#define SOL_0x29_LENGTH 10
+
#define SOL_DATA_FROM_HOST 0x2A //Host to Console
#define SOL_HEARTBEAT 0x2B
@@ -382,6 +382,24 @@ int redir_data(struct redir *r) goto again; redir_stop(r); break; + case SOL_0x29: + bshift = SOL_0x29_LENGTH; + if (r->blen < bshift) + goto again; + /* There is some data in this packet. Probably some port + * reset data, flow control or whatever. I've seen the following: + * + * 0x29 0x00 0x00 0x00 0x03 0x00 0x00 0x00 0x00 0x06 + * 0x29 0x00 0x00 0x00 0x04 0x00 0x00 0x00 0x02 0x04 + + * 0x29 0x00 0x00 0x00 0x91 0x00 0x00 0x00 0x00 0x00 + * 0x29 0x00 0x00 0x00 0x92 0x00 0x00 0x00 0x00 0x04 + * + * It seems harmless to just ignore this stuff, the + * redirection keeps working anyway. + */ + break; + default: snprintf(r->err, sizeof(r->err), "%s: unknown r->buf 0x%02x", __FUNCTION__, r->buf[0]); |