--- pfsetvlan   2010-01-05 22:57:06.000000000 +0100
+++ /usr/local/pf//sbin/pfsetvlan       2010-04-01 14:12:21.270062747 +0200
@@ -448,7 +448,8 @@
                     if ( $prefix =~ /^inparse/ ) {
                         push @tmpTrapList_queued, $trapList_queued[$i];
                         if ( $trapLine
-                            =~ /^\d{4}-\d{2}-\d{2}\|\d{2}:\d{2}:\d{2}\|(?:UDP: \[)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\]:\d+)?\|([^|]*)\|(.+)$/
+                            #=~ /^\d{4}-\d{2}-\d{2}\|\d{2}:\d{2}:\d{2}\|(?:UDP: \[)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\]:\d+)?\|([^|]*)\|(.+)$/
+                            =~  /^\d{4}-\d{2}-\d{2}\|\d{2}:\d{2}:\d{2}\|(?:UDP: \[)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\]:\d+)\]?\-\>\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]\|([^|]*)\|(.+)$/
                             )
                         {
                             my $switch_ip = $1;
@@ -590,7 +591,8 @@
     Log::Log4perl::MDC->put( 'tid', threads->self->tid() );

     $logger->debug("parsing trap $trapLine");
-    if ( $trapLine =~ /^\d{4}-\d{2}-\d{2}\|\d{2}:\d{2}:\d{2}\|(?:UDP: \[)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\]:\d+)?\|([^|]*)\|(.+)$/ ) {
+   # if ( $trapLine =~ /^\d{4}-\d{2}-\d{2}\|\d{2}:\d{2}:\d{2}\|(?:UDP: \[)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\]:\d+)\]?\|([^|]*)\|(.+)$/ ) {
+     if ( $trapLine =~ /^\d{4}-\d{2}-\d{2}\|\d{2}:\d{2}:\d{2}\|(?:UDP: \[)?(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?:\]:\d+)\]?\-\>\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]\|([^|]*)\|(.+)$/ ) {

         #test if this is a 'normal' trap (i.e. a trap sent from a switch
         #or a local trap (INVERSE-PACKETFENCE-NOTIFICATION-MIB)
