------------------------------pfmon patch-------------------------------
--- pfmon.org   2009-04-23 11:58:25.000000000 +0200
+++ pfmon       2009-04-23 12:01:57.000000000 +0200
@@ -452,6 +452,29 @@
         $newflag = 1 if ( !$violations{$mac} );
     }

+# This will be a violation (event) someday
+#
+    if (isenabled($Config{'trapping'}{'registration'})) {
+       my @unregistered = nodes_active_unregistered();
+
+       # Add unregistered to violation array
+       #
+       my $maxsize = $Config{'registration'}{'queuesize'} || 0;
+       my $total=0;
+       for my $row (@unregistered) {
+           my $mac = $row->{'mac'};
+           my $ip = $row->{'ip'};
+           if (reggable_ip($ip) && trappable_ip($ip) && trappable_mac($mac) &&
+               !$new_violations{$mac}){
+               pflogger("adding unreged $mac ($ip) to violations",8);
+               push @violators, $row;
+               $new_violations{$mac}=$ip;
+               $newflag=1 if (!$violations{$mac});
+               last if ($maxsize>0 && $total++ == $maxsize);
+           }
+       }
+    }
+
     # update the violations hash for other threads
     {
         $logger->trace("trying to obtain lock on \%violations in rearp sub");
@@ -696,6 +719,10 @@

         if ( isenabled( $Config{'arp'}{'cleanshutdown'} ) ) {
             my @violators = violation_view_all_active();
+           if (isenabled($Config{'trapping'}{'registration'})) {
+               my @unregistered = nodes_active_unregistered();
+               push @violators, @unregistered;
+           }
             foreach my $violator (@violators) {
                 freemac( $violator->{'mac'} );
             }
