]> git.sesse.net Git - nms/commitdiff
Make the survey survey all nets.
authorroot <root@sysrq>
Wed, 4 Apr 2007 18:03:32 +0000 (20:03 +0200)
committerroot <root@sysrq>
Wed, 4 Apr 2007 18:03:32 +0000 (20:03 +0200)
mbd/mbd.pl

index 4b73ac9b4e1e484a1b20b28cc4d288664e657b6b..96363745ca9f91f040fe5303b1ad608a639523c3 100644 (file)
@@ -200,6 +200,21 @@ while (1) {
 
                my $num_nets = 0;
                for my $net (@Config::networks) {
+                       if ($survey) {
+                               $sendsock->set({
+                                       ip => {
+                                               saddr => $Config::survey_ip,
+                                               daddr => $broadcast
+                                       },
+                                       udp => {
+                                               source => $survey_sport,
+                                               dest => $dport,
+                                               data => $data
+                                       }
+                               });
+                               $sendsock->send;
+                       }
+
                        next if (cache_cidrlookup(inet_ntoa($saddr), $net));
 
                        my ($range) = cache_cidrrange($net);
@@ -219,21 +234,6 @@ while (1) {
                        });
                        $sendsock->send;
 
-                       if ($survey) {
-                               $sendsock->set({
-                                       ip => {
-                                               saddr => $Config::survey_ip,
-                                               daddr => $broadcast
-                                       },
-                                       udp => {
-                                               source => $survey_sport,
-                                               dest => $dport,
-                                               data => $data
-                                       }
-                               });
-                               $sendsock->send;
-                       }
-
                        ++$num_nets;
                }