Date: Fri, 3 Jul 2015 17:43:55 +0000 (UTC) From: Kubilay Kocak <koobs@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r391264 - in head/net-mgmt/rancid: . files Message-ID: <201507031743.t63Hht54044988@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: koobs Date: Fri Jul 3 17:43:54 2015 New Revision: 391264 URL: https://svnweb.freebsd.org/changeset/ports/391264 Log: net-mgmt/rancid: Fix IPv6 prefix-lists, ASR9001 output and foundry slowness Back-port a patch from 3.2 to 2.3.8 to make ipv6 prefix-lists sort properly, which is broken in perl >=5.18 due to hash randomisation changes Fix ASR9001 XR, which updates 3 hard disk files on a regular basis (uptime_cont, temp_cont, volt_cont), which causes excessive output noise. Change timing parameters for foundry networks equipment (brocade) so that it doesn't take eternity to make configuration changes on multiple switches. PR: 200733 Submitted by: <nick foobar org> Approved by: Janos Mohacsi <jmohacsi bsd hu> (maintainer) Added: head/net-mgmt/rancid/files/patch-bin__flogin.in (contents, props changed) head/net-mgmt/rancid/files/patch-bin__rancid.in (contents, props changed) head/net-mgmt/rancid/files/patch-bin__xrrancid.in (contents, props changed) Modified: head/net-mgmt/rancid/Makefile Modified: head/net-mgmt/rancid/Makefile ============================================================================== --- head/net-mgmt/rancid/Makefile Fri Jul 3 17:42:16 2015 (r391263) +++ head/net-mgmt/rancid/Makefile Fri Jul 3 17:43:54 2015 (r391264) @@ -3,7 +3,7 @@ PORTNAME= rancid PORTVERSION= 2.3.8 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.shrubbery.net/pub/rancid/ @@ -31,7 +31,6 @@ NEWERCONFIG_FILES2= etc/lg.conf NEWCONFIG_FILES= rancid.conf lg.conf OPTIONS_DEFINE= SVN -OPTIONS_DEFAULT= SVN_DESC= Use Subversion instead of CVS Added: head/net-mgmt/rancid/files/patch-bin__flogin.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/rancid/files/patch-bin__flogin.in Fri Jul 3 17:43:54 2015 (r391264) @@ -0,0 +1,11 @@ +--- bin/flogin.in.orig 2015-06-09 16:08:17.000000000 +0100 ++++ bin/flogin.in 2015-06-09 15:59:02.000000000 +0100 +@@ -84,7 +84,7 @@ + # Sometimes routers take awhile to answer (the default is 10 sec) + set timeoutdflt 45 + # +-set send_human {.4 .4 .7 .3 5} ++set send_human {.01 .01 100 .01 2} + + # Find the user in the ENV, or use the unix userid. + if {[ info exists env(CISCO_USER) ]} { Added: head/net-mgmt/rancid/files/patch-bin__rancid.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/rancid/files/patch-bin__rancid.in Fri Jul 3 17:43:54 2015 (r391264) @@ -0,0 +1,45 @@ +--- bin/rancid.in.orig 2015-06-09 15:46:07.000000000 +0100 ++++ bin/rancid.in 2015-06-09 15:57:24.000000000 +0100 +@@ -162,13 +162,38 @@ + @sorted_lines; + } + +-# These two routines will sort based upon IP addresses ++# ipaddrval(IPaddr) converts and IPv4/v6 address to a string for comparison. + sub ipaddrval { +- my(@a) = ($_[0] =~ m#^(\d+)\.(\d+)\.(\d+)\.(\d+)$#); +- $a[3] + 256 * ($a[2] + 256 * ($a[1] +256 * $a[0])); ++ my($a) = @_; ++ my($norder); ++ ++ if ($a =~ /:/) { ++ my($l); ++ if ($a =~ /\//) { ++ ($a, $l) = split(/\//, $a); ++ } else { ++ $l = 128; ++ } ++ $norder = inet_pton(AF_INET6, $a); ++ return unpack("H*", $norder) . unpack("H*", pack("C", $l)); ++ } else { ++ my($l); ++ if ($a =~ /\//) { ++ ($a, $l) = split(/\//, $a); ++ } else { ++ $l = 32; ++ } ++ $norder = inet_pton(AF_INET, $a); ++ return(unpack("H*", $norder) . unpack("H*", pack("C", $l))); ++ } ++ ++ # otherwise return the original key value, so as not to sort on null ++ return($_[0]); + } ++ ++# sortbyipaddr(IPaddr, IPaddr) compares two IPv4/v6 addresses like strcmp(). + sub sortbyipaddr { +- &ipaddrval($a) <=> &ipaddrval($b); ++ &ipaddrval($a) cmp &ipaddrval($b); + } + + # This routine parses "show version" Added: head/net-mgmt/rancid/files/patch-bin__xrrancid.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/rancid/files/patch-bin__xrrancid.in Fri Jul 3 17:43:54 2015 (r391264) @@ -0,0 +1,11 @@ +--- bin/xrrancid.in.orig 2015-06-09 15:58:36.000000000 +0100 ++++ bin/xrrancid.in 2015-06-09 16:03:53.000000000 +0100 +@@ -590,7 +590,7 @@ + next; + } + # Filter debugging file dlbg.txt & dlbg.txt-1 only on ASR9k w/ XR +- if ($proc =~ /ASR9K/ && /dlbg\.txt/) { ++ if ($proc =~ /ASR9K/ && (/dlbg\.txt/ || /uptime_cont/ || /temp_cont/ || /volt_cont/)) { + next; + } + if (/.*\((\d+) bytes free\)/) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201507031743.t63Hht54044988>