telnet hanging

john heasley heas at shrubbery.net
Fri Oct 18 19:20:42 UTC 2002


Fri, Oct 18, 2002 at 10:33:23AM -0400, jlewis at lewis.org:
> On Tue, 15 Oct 2002 jlewis at lewis.org wrote:
> 
> > Just upgrading expect and tcl to Red Hat 7.3's rpms didn't solve the 
> > problem.  I'm currently running
> > 
> > expect-5.32.2-67
> > tcl-8.3.3-67
> > kernel-2.4.9-13
> > 
> > Tomorrow, I'll try upgrading to kernel-2.4.18-10 and see if it makes a 
> > difference.  If not, I guess I'll try rebuilding an expect rpm with the 
> > suggested patch.
> 
> The kernel upgrade didn't help either.  I ended up rebuilding the tcltk 
> src.rpm for Red Hat 7.2 with the suggested one line patch, and that seems 
> to have solved the telnet hanging problem.

with the same versions of expect and tcl listed above?

> Now I have another odd one that I hope isn't a FAQ.  I've added a bunch of 
> cisco access-servers (5200's, 5300's, and a 5800) to my rancid setup, and 
> for some reason, these ciscos seem to vary the number of !'s separating 
> sections of the config from one 'write term' to the next even though 
> nobody has logged in and made changes to the config.

never seen this, but the attached patch ought to do it.

> So I'm constantly being emailed diffs like:
> 
>   ip classless
>   ip route 0.0.0.0 0.0.0.0 209.208.16.1
>   no ip http server
>   !
> + !
>   access-list 20 permit ...
>   access-list 20 permit ...
>   access-list 20 permit ...
>   access-list 20 deny   any
> 
> followed by  
> 
>   ip classless
>   ip route 0.0.0.0 0.0.0.0 209.208.16.1
>   no ip http server
>   !
> - !
>   access-list 20 permit ...
>   access-list 20 permit ...
>   access-list 20 permit ...
>   access-list 20 deny   any
> 
> Obviously, this would appear to be more of a cisco problem than a rancid
> one, but I suspect someone else must have run into this and wonder if 
> anyone's come up with a fix or knows how to get the cisco's to stop doing 
> this.
> 
> ----------------------------------------------------------------------
>  Jon Lewis *jlewis at lewis.org*|  I route
>  System Administrator        |  therefore you are
>  Atlantic Net                |  
> _________ http://www.lewis.org/~jlewis/pgp for PGP public key_________
-------------- next part --------------
Index: rancid.in
===================================================================
RCS file: /home/rancid/.CVS/rancid/bin/rancid.in,v
retrieving revision 1.119
diff -d -u -r1.119 rancid.in
--- rancid.in	2002/09/29 23:00:41	1.119
+++ rancid.in	2002/10/18 19:16:05
@@ -869,7 +869,7 @@
 # This routine processes a "write term"
 sub WriteTerm {
     print STDERR "    In WriteTerm: $_" if ($debug);
-    my($lineauto) = 0;
+    my($lineauto,$comment) = (0,0);
 
     while (<INPUT>) {
 	tr/\015//d;
@@ -897,6 +897,16 @@
 	# some versions have other crap mixed in with the bits in the
 	# block above
 	/^! (Last configuration|NVRAM config last)/ && next;
+
+	# skip multiple comment lines to avoid toggling extra comment on some
+	# access servers.  grrr.
+	if (/^!/) {
+	    next if ($comment);
+	    ProcessHistory("","","",$_);
+	    $comment++;
+	    next;
+	}
+	$comment = 0;
 
 	# Dog gone Cool matches to process the rest of the config
 	/^tftp-server flash /   && next; # kill any tftp remains


More information about the Rancid-discuss mailing list