X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=mbd%2Fmbd.pl;fp=mbd%2Fmbd.pl;h=44dd334a854dbb2a0a561c707b26a5925b9085fe;hb=7ae11f7618602eef12abc857b7434d26a895d346;hp=fe89d49edfcfa0810f0a8c3abc6770698d4bd812;hpb=ea6dfbe82f8c2be844a374b0f237dce4f1737562;p=nms diff --git a/mbd/mbd.pl b/mbd/mbd.pl index fe89d49..44dd334 100644 --- a/mbd/mbd.pl +++ b/mbd/mbd.pl @@ -94,6 +94,8 @@ while (1) { next unless $pass; + my $num_nets = 0; + for my $net (@Config::networks) { next if (cache_cidrlookup(inet_ntoa($saddr), $net)); @@ -101,8 +103,6 @@ while (1) { $range =~ /-(.*?)$/; my $broadcast = $1; - print inet_ntoa($saddr), ", $dport, $size bytes => $broadcast\n"; - $sendsock->set({ ip => { saddr => inet_ntoa($saddr), @@ -115,7 +115,9 @@ while (1) { } }); $sendsock->send; + ++$num_nets; } + print inet_ntoa($saddr), ", $dport, $size bytes => ($num_nets networks)\n"; } }