Code

Added capability to define multiple specific interfaces (comma or space separated...
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Jan 2008 13:18:16 +0000 (13:18 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 28 Jan 2008 13:18:16 +0000 (13:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@8619 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-si/modules/ArpHandler.pm

index 63ccb1df872cb8adc57106836b49432abd1ebecc..1590572a76e829bd5732b6abc5032163808aa804 100644 (file)
@@ -66,16 +66,20 @@ sub get_module_info {
                        }
                }
        } else {
-               &main::daemon_log("Starting ArpWatch on $interface", 1);
-               POE::Session->create( 
-                       inline_states => {
-                               _start => \&start,
-                               _stop => sub {
-                                       $_[KERNEL]->post( sprintf("arp_watch_$interface") => 'shutdown' )
+               foreach my $device(split(/[\s,]+/, $interface)) {
+                       &main::daemon_log("Starting ArpWatch on $device", 1);
+                       POE::Session->create( 
+                               inline_states => {
+                                       _start => sub {
+                                               &start(@_,$device);
+                                       },
+                                       _stop => sub {
+                                               $_[KERNEL]->post( sprintf("arp_watch_$device") => 'shutdown' )
+                                       },
+                                       got_packet => \&got_packet,
                                },
-                               got_packet => \&got_packet,
-                       },
-               );
+                       );
+               }
        }
 
        return \@info;