summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--RedirectionConstants.h4
-rw-r--r--redir.c18
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
diff --git a/redir.c b/redir.c
index fb7fe51..03c0eac 100644
--- a/redir.c
+++ b/redir.c
@@ -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]);