#
# old_revision [69347a6378a28890628a182b3348b1e1524aacf8]
#
# patch "pf/cgi-bin/redir.cgi"
#  from [3bfb83a97c50c2cac8de6de620568f558fea98f5]
#    to [a5944d36fca3a7d30c7ae7fed3f2a495a16c7b67]
#
============================================================
--- pf/cgi-bin/redir.cgi	3bfb83a97c50c2cac8de6de620568f558fea98f5
+++ pf/cgi-bin/redir.cgi	a5944d36fca3a7d30c7ae7fed3f2a495a16c7b67
@@ -140,10 +140,18 @@ if ($Config{'network'}{'mode'} =~ /arp/i
   my $output = qx/$cmd/;
   $logger->info("freed $mac");
 }
-#TODO: I think the below here is what's causing redirect loops, need to confirm first then fix
-$logger->info("redirecting to ".$Config{'trapping'}{'redirecturl'});
-print $cgi->redirect($Config{'trapping'}{'redirecturl'});
 
+$logger->info(
+  "MAC $mac shouldn't reach here. " .
+  "Calling access re-evaluation through flip.pl. " .
+  "Make sure your network device configuration is correct."
+);
+my @args = ( $Config{'vlan'}{'adjustswitchportvlanscript'}, $mac );
+system(@args);
+pf::web::generate_error_page($cgi, $session, 
+  "Your network should be enabled within a minute or two. If it is not reboot your computer."
+);
+
 =head1 AUTHOR
 
 Dominik Gehl <dgehl@inverse.ca>
