Index: branches/stable/cgi-bin/main.cgi
===================================================================
--- branches/stable/cgi-bin/main.cgi	(revision 596)
+++ branches/stable/cgi-bin/main.cgi	(revision 598)
@@ -331,4 +331,5 @@
         type => $ipinfo->{type},
         allocfrom => $pool,
+	vrf => $ipinfo->{vrf},
         );
     } elsif ($webvar{fbtype} eq 'n') {
@@ -477,4 +478,5 @@
   $page->param(cidr => $cidr);
   $page->param(city => $q->escapeHTML($webvar{city}));
+  $page->param(vrf => $webvar{vrf});
   $page->param(custid => $webvar{custid});
   $page->param(circid => $q->escapeHTML($webvar{circid}));
@@ -521,5 +523,5 @@
   my ($code,$msg) = allocateBlock($ip_dbh, $webvar{fullcidr}, $webvar{alloc_from},
 	$webvar{custid}, $webvar{alloctype}, $webvar{city}, $webvar{desc}, $webvar{notes},
-	$webvar{circid}, $webvar{privdata}, $webvar{node});
+	$webvar{circid}, $webvar{privdata}, $webvar{node}, $webvar{vrf});
 
   if ($code eq 'OK' || $code eq 'WARN') {
@@ -695,4 +697,6 @@
 ## end node hack
 
+  $page->param(vrf => $blockinfo->{vrf});
+
   my ($lastmod,undef) = split /\s+/, $blockinfo->{lastmod};
   $page->param(lastmod => $lastmod);
@@ -735,4 +739,5 @@
 	type		=> $webvar{alloctype},
 	swip		=> $webvar{swip},
+	vrf		=> $webvar{vrf},
 	);
 
@@ -784,4 +789,5 @@
   $page->param(city => $webvar{city});
   $page->param(disptype => $disp_alloctypes{$webvar{alloctype}});
+  $page->param(vrf => $webvar{vrf});
   $page->param(custid => $webvar{custid});
   $page->param(swip => $webvar{swip} eq 'on' ? 'Yes' : 'No');
@@ -869,4 +875,11 @@
   # need to retrieve block data before deleting so we can notify on that
   my $blockinfo = getBlockData($ip_dbh, $webvar{block});
+# hack pthui.  This goes away with the new structure, since routed
+# and master blocks can be retrieved with getBlockData()
+if ($webvar{alloctype} eq 'rm') {
+  $blockinfo = { custid => 'N/A', city => $webvar{city}, description => 'N/A' };
+} elsif ($webvar{alloctype} eq 'mm') {
+  $blockinfo = { custid => 'N/A', city => 'N/A', description => 'N/A' };
+}
 
   my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{alloctype});
