#
# old_revision [3180b4c608be1a77f27741480c50acbfff125054]
#
# patch "pf/cgi-bin/redir.cgi"
#  from [b28da2d1584e1f86a22d3671b7bc9f18a7073e93]
#    to [1bee916b0e56fdaa6222587cf20223d0beed21a3]
#
============================================================
--- pf/cgi-bin/redir.cgi	b28da2d1584e1f86a22d3671b7bc9f18a7073e93
+++ pf/cgi-bin/redir.cgi	1bee916b0e56fdaa6222587cf20223d0beed21a3
@@ -117,7 +117,15 @@ 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."
+);
+
