diff --git a/tools/runtime/route-servers/compare-route-server-prefixes.pl b/tools/runtime/route-servers/compare-route-server-prefixes.pl
index 0801eac..53e8337 100755
--- a/tools/runtime/route-servers/compare-route-server-prefixes.pl
+++ b/tools/runtime/route-servers/compare-route-server-prefixes.pl
@@ -33,6 +33,7 @@
 #
 # NB: Ensure you set $vlanid, $conffile and $sockfile in the protocols loop
 #     below (search for XXX-SET-ME)
+# NB: I also marked local changes we needed to make with XXX-TWEAKED
 
 
 use strict;
@@ -43,12 +44,13 @@ use NetAddr::IP qw(:lower Compact);
 use IXPManager::Config;
 use IXPManager::Const;
 
-my $devmode = 1;
-my $debug = 1;
+my $devmode = 0;
+my $debug = 0;
 my $do_nothing = 0;
 
 # XXX-SET-ME
-my $vlanid = "1";
+# XXX-TWEAKED: we don't need this, we only have one vlan
+#my $vlanid = "1";
 
 my $ixpconfig = new IXPManager::Config;
 my $dbh = $ixpconfig->{db};
@@ -64,6 +66,11 @@ if (!$sth->execute(CUST_TYPE_FULL, CUST_TYPE_PROBONO, CUST_TYPE_INTERNAL)) {
 }
                 
 my $autsys = $sth->fetchall_hashref('autsys');
+# XXX-TWEAKED: we use id numbers and names in config entries, so we use a reverse-lookup hash
+my %rev_autsys = ();
+for my $key ( keys %$autsys ) {
+	$rev_autsys{ $autsys->{$key}{id} } = $key;
+}
 
 # Prepare some statements for flinging crap into the table
 $query = "INSERT into rs_prefixes (timestamp, custid, prefix, protocol, irrdb, rs_origin) VALUES (NOW(), ?, ?, ?, ?, ?)";
@@ -103,14 +110,24 @@ while (my $rec = $sth->fetchrow_hashref) {
 
 foreach my $protocol (qw(4 6)) {
 	# XXX-SET-ME
-	my $conffile = "/etc/bird/bird-vlanid".$vlanid."-ipv".$protocol.".conf";
-	my $sockfile = "/var/run/bird/bird-vlanid".$vlanid."-ipv".$protocol.".ctl";
+	# XXX-TWEAKED: we have a different filenaming scheme
+	#my $conffile = "/etc/bird/bird-vlanid".$vlanid."-ipv".$protocol.".conf";
+	#my $sockfile = "/var/run/bird/bird-vlanid".$vlanid."-ipv".$protocol.".ctl";
+	my ($conffile, $sockfile);
+	if ($protocol == 4) {
+		$conffile = "/etc/bird/bird.conf";
+		$sockfile = "/var/run/bird/bird.ctl";
+	} else {
+		$conffile = "/etc/bird/bird6.conf";
+		$sockfile = "/var/run/bird/bird6.ctl";
+	}
 
 	open (INPUT, $conffile);
 	my ($asn, $address, $prefixes);
 
 	while (<INPUT>) {
-		if (/^\s*allnet\s*=\s*\[\s*([a-fA-F0-9\.:,\s\/]+)\s*\]/) {
+		# XXX-TWEAKED: we use "xxx_prefixes =" instead of "allnet ="
+		if (/^\s*[a-z]+_prefixes\s*=\s*\[\s*([a-fA-F0-9\.:,\s\/]+)\s*\]/) {
 			$prefixes = $1;
 			$prefixes =~ s/^\s+|\s+$//g;
 			next;
@@ -140,18 +157,27 @@ foreach my $protocol (qw(4 6)) {
 	
 	open (INPUT, '/usr/sbin/birdc -s '.$sockfile.' show protocols |');
 	while (<INPUT>) {
-		next unless (/^pb_(\d+)_as(\d+)\s+.*\s+up\s+.*\s+Established/);
-		push (@asnlist, $2);
-		$vliidhash{ $2 } = $1;
-		print "BIRDC: Found established session for $2 (with vliid $1)\n" if( $devmode );
-		
+		# XXX-TWEAKED: our config format is different
+		#next unless (/^pb_(\d+)_as(\d+)\s+.*\s+up\s+.*\s+Established/);
+		next unless (/^b_([a-z]+)(\d+)\s+.*\s+up\s+.*\s+Established/);
+
+		# XXX-TWEAKED: use reverse lookup as we use names/ids, not ids/ASNs, in configs
+		#push (@asnlist, $2);
+		#$vliidhash{ $2 } = $1;
+		#print "BIRDC: Found established session for $2 (with vliid $1)\n" if( $devmode );
+		$asn = $rev_autsys{ $2 };
+		push (@asnlist, $asn);
+		$vliidhash{$asn} = {'name' => $1, 'id' => $2};
+		print "BIRDC: Found established session for $asn (with vliid $1)\n" if( $devmode );
 	}
 	close (INPUT);
 
 	$do_nothing or $dbh->do('START TRANSACTION') or die $dbh->errstr;
-                                   
+
 	foreach my $asn (@asnlist) {
-		my $cmd = '/usr/sbin/birdc -s '.$sockfile.' show route table t_' . $vliidhash{ $asn } . '_as'.$asn.' protocol pb_' . $vliidhash{ $asn } . '_as'.$asn;
+		# XXX-TWEAKED: our config format is different
+		#my $cmd = '/usr/sbin/birdc -s '.$sockfile.' show route table t_' . $vliidhash{ $asn } . '_as'.$asn.' protocol pb_' . $vliidhash{ $asn } . '_as'.$asn;
+		my $cmd = '/usr/sbin/birdc -s '.$sockfile.' show route table t_' . $vliidhash{$asn}{'name'} . $vliidhash{$asn}{'id'} . ' protocol b_' . $vliidhash{$asn}{'name'} . $vliidhash{$asn}{'id'};
 		print "BIRD: $cmd\n" if ($debug);
 		open (INPUT, $cmd.' |');
 		while (<INPUT>) {
