- for my $port ($Config::survey_port_low..$Config::survey_port_high) {
- if (!exists($active_surveys{$port})) {
- $survey_sport = $port;
-
- $active_surveys{$port} = {
- start => $now,
- active => 1,
- dport => $dport,
- num => 0
- };
- $last_survey{$dport} = $now;
-
- last;
+ if ($survey) {
+ for my $port ($Config::survey_port_low..$Config::survey_port_high) {
+ if (!exists($active_surveys{$port})) {
+ $survey_sport = $port;
+
+ $active_surveys{$port} = {
+ start => $now,
+ active => 1,
+ dport => $dport,
+ entry => $entry,
+ num => 0
+ };
+ $last_survey{$entry . "/" . $dport} = $now;
+
+ last;
+ }