[rancid] Rancid submits random characters after logon - causes config read failure
heasley
heas at shrubbery.net
Mon Sep 15 19:18:59 UTC 2014
Fri, Sep 12, 2014 at 10:03:08PM +0200, Per-Olof Olsson:
> Hello
>
> Have someone tested to extend the time, device and tty driver have to negotiate
> window size at login, before expect start to analyze text?
>
> Seems to work if I use "sleep 3"
ESC[row,colR appears to be the response to Esc[6n. So, does this fix it?
Index: bin/hpuifilter.c
===================================================================
--- bin/hpuifilter.c (revision 2859)
+++ bin/hpuifilter.c (working copy)
@@ -537,7 +537,7 @@
filter(char *buf, int len)
{
static regmatch_t pmatch[1];
-#define N_REG 16 /* number of regexes in reg[][] */
+#define N_REG 17 /* number of regexes in reg[][] */
#define N_CRs 2 /* number of CR replacements */
static regex_t preg[N_REG];
static char reg[N_REG][50] = { /* vt100/220 escape codes */
@@ -556,7 +556,10 @@
"\x1B\\[\\?25l", /* vi */
"\x1B\\[K", /* ce */
"\x1B\\[7m", /* mr - ansi */
+
"\x1B\\[6n", /* u7 - ansi */
+ "\x1B\\[[0-9]+;[0-9]+R", /* E[6n reply */
+
"\x07", /* bell */
/* replace these with CR */
More information about the Rancid-discuss
mailing list