(cd mbd && ./generate-helper-list.pl > ../mbd-ports)
./config/make-port-config.pl
scp mbd-ports *-config sesse@f1:/tftpboot/portcfg/
+
+# regenerate the mbd netlist
+(echo '# Autogenerated. Do not touch!' ; echo "package Config;"; echo 'our @networks = (' ; cut -d" " -f1-2 switches.txt | perl -e 'while (<>) { chomp; my ($net,$mask) = split / /; print "\t\"$net/$mask\",\n"; }' ; echo ');' ; echo '1;') > mbd/nets.pl
# warcraft 3 - untested (packet dump only)
{
ports => [ "6112..6119" ],
- sizes => [ 16, 48 ]
+ sizes => [ 16, 48 ],
+ filter => sub { return (ord(substr(shift, 1, 1)) == 0x2f); }
},
# ut2003/ut2004 - untested (packet dump only)
# Check against the ACL.
my $pass = 0;
for my $rule (@Config::access_list) {
- if (mbd::match_ranges($dport, $rule->{'ports'}) &&
- mbd::match_ranges($size, $rule->{'sizes'})) {
- $pass = 1;
+ next unless (mbd::match_ranges($dport, $rule->{'ports'}));
+ next unless (mbd::match_ranges($size, $rule->{'sizes'}));
+
+ if ($rule->{'filter'}) {
+ next unless ($rule->{'filter'}($data));
}
+
+ $pass = 1;
+ last;
}
if (!$pass) {
+++ /dev/null
-
-package Config;
-
-our @networks = (
- "10.0.10.0/24",
- "10.0.11.0/24"
-);
-
-1;