]> git.sesse.net Git - nms/commitdiff
Merge with eirikns branch.
authorroot <root@space>
Tue, 3 Apr 2007 21:03:59 +0000 (23:03 +0200)
committerroot <root@space>
Tue, 3 Apr 2007 21:03:59 +0000 (23:03 +0200)
15 files changed:
clients/dhcptail.pl
config/make-port-config.pl
mbd/mbd.pl
web/bg07.png
web/dhcpkart.pl
web/make-switches.pl
web/nettkart-telnet.pl
web/nettkart-text.pl
web/nettkart-web.pl
web/nettkart.pl
web/overlay.pl
web/portkart.pl
web/sendsms.pl
web/stempmap.pl
web/streaming.pl

index a1e1c624fa0511a11677980020bf9f2adfdf1a11..6a529de940caa23aa252afe5e4b5972f6c41c754 100755 (executable)
@@ -7,7 +7,7 @@ use strict;
 use warnings;
 
 # WARNING: CHANGE THIS! :-P
-my $year = 2006;
+my $year = 2007;
 
 my %months = (
        Jan => 1,
@@ -31,7 +31,7 @@ while (<>) {
 
        if (!defined($dbh) || !$dbh->ping) {
                $dbh = nms::db_connect();
-               $q = $dbh->prepare("UPDATE dhcp SET last_ack=? WHERE inet ? << network AND ( last_ack < ? OR last_ack IS NULL )")
+               $q = $dbh->prepare("UPDATE dhcp SET last_ack=? WHERE ?::inet << network AND ( last_ack < ? OR last_ack IS NULL )")
                        or die "Couldn't prepare query";
        }
 
index ee75cab1b2e4e1b693d32bf07858f1027ce76b9c..4ab50026d6651151ce76e2d52a94b06f8c2d6aa7 100755 (executable)
@@ -26,6 +26,7 @@ while (<PATCHLIST>) {
        }
 
        my $vlan = "$row$switch";
+       my $ipv6 = sprintf "F%02u%u", $row, $switch;
 
        $distros{$distro} .= <<"EOF";
 vlan $vlan
@@ -39,7 +40,8 @@ interface vlan $vlan
   ip helper-address 87.76.254.2
   no ip proxy-arp
   ip access-group great-wall-of-tg in
-  ipv6 address 2001:16D8:FFFF:$vlan::1/64
+  ipv6 address 2001:16D8:FFFF:${ipv6}::1/64
+  ip igmp version 3
   no shutdown
 !
  
@@ -52,7 +54,6 @@ interface $port
  spanning-tree portfast
  spanning-tree bpduguard enable
 
- ip igmp snooping
  storm-control broadcast level 2
  no shutdown
 !
index cbb1237c9d6d49c379c701d6a84db7a6b929f0ba..7fcc8d8100a3a67e6e2f41bd763d797c684e4a06 100644 (file)
@@ -16,6 +16,8 @@ sub fhbits {
        return $bits;
 }
 
+open LOG, ">>", "mbd.log";
+
 my @ports = mbd::find_all_ports();
 
 # Open a socket for each port
@@ -62,6 +64,8 @@ while (1) {
                        last;
                }
 
+               print LOG "$dport $size $pass\n";
+
                if (!$pass) {
                        print "$dport, $size bytes => filtered\n";
                }
index c5c39604edb90fc382b6b2d89b3c5a8a9fe1aaa7..6c367a6923486e4483a5dd007eb07688d84aef03 100644 (file)
Binary files a/web/bg07.png and b/web/bg07.png differ
index 0cc0e6772398b7ab1c8cc868cde97fe392ecbf22..e14e0c5a8bbfa356cf7811fee777f7023400d093 100755 (executable)
@@ -12,11 +12,11 @@ my $maxtimeout = $greentimeout*9;
 my $dbh = nms::db_connect();
 
 GD::Image->trueColor(1);
-$img = GD::Image->new('bg2.png');
+$img = GD::Image->new('bg07.png');
 
 my $blk = $img->colorResolve(0, 0, 0);
 
-$img->string(gdMediumBoldFont,0,0,"TG05 - DHCP-lease status",$blk);
+$img->string(gdMediumBoldFont,0,0,"TG07 - DHCP-lease status",$blk);
 $img->string(gdSmallFont,0,20,"Last recieved DHCP-request",$blk);
 
 # first  1/5: green (<30 min)
@@ -70,7 +70,7 @@ $dbh->disconnect;
 
 if (!defined($ARGV[0])) {
        print $cgi->header(-type=>'image/png',
-                          -refresh=>'10; http://nms.tg05.gathering.org/dhcpkart.pl');
+                          -refresh=>'10; http://nms.tg07.gathering.org/dhcpkart.pl');
 }
 print $img->png;
 
index 2829ed7fb28daf60f57c821d7ebdb61e3f192f95..e1d3fe9b3c4f400bfabc3a7e585317889723a2f6 100644 (file)
@@ -22,7 +22,7 @@ while (<PATCHLIST>) {
        $name =~ /e(\d+)-(\d+)/;
        my ($e, $s) = ($1, $2);
 
-       my $x = int(202 + $e * 8.25);
+       my $x = int(244 + $e * 9.87);
        my $y;
 
        $x += 7 if ($e >= 19);
@@ -35,12 +35,12 @@ while (<PATCHLIST>) {
                $c = $e;
                $d = ($s - 1) * 64;
 
-               $y = 470 - $s * 48;
+               $y = 455 - $s * 48;
        } else {
                $c = $e + 1;
                $d = ($s - 4) * 64;
 
-               $y = 400 - $s * 48 - ($s - 3) * 2;
+               $y = 424 - $s * 48 - ($s - 3) * 2;
        }
 
        my $xx = $x + 12;
index 3a8353907051aeef652e0c7ed2b2c160b51545aa..783f53ebf8e71bd68db213523d2ca389bc3b51ef 100755 (executable)
@@ -6,7 +6,7 @@ use nms;
 my $cgi = CGI->new;
 
 my $dbh = nms::db_connect();
-print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg05.gathering.org/nettkart-telnet.pl');
+print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg07.gathering.org/nettkart-telnet.pl');
 
 print <<"EOF";
 <html>
index 7255e581de5874a7af31ea7530be33a9b3041969..cf198dd36ee20fca507bfd27403172215b0aa73c 100755 (executable)
@@ -6,7 +6,7 @@ use nms;
 my $cgi = CGI->new;
 
 my $dbh = nms::db_connect();
-print $cgi->header(-type=>'text/html', -refresh=>'10; http://nms.tg05.gathering.org/nettkart-text.pl');
+print $cgi->header(-type=>'text/html', -refresh=>'10; http://nms.tg07.gathering.org/nettkart-text.pl');
 
 print <<"EOF";
 <html>
index 154181f3814b977de41fc99df35187aaf3eda886..040d4767865e5ee2a5566a60ff079caf0be4933f 100755 (executable)
@@ -6,7 +6,7 @@ use nms;
 my $cgi = CGI->new;
 
 my $dbh = nms::db_connect();
-print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg05.gathering.org/nettkart-web.pl');
+print $cgi->header(-type=>'text/html', -refresh=>'45; http://nms.tg07.gathering.org/nettkart-web.pl');
 
 print <<"EOF";
 <html>
index e0b47e8bba26669fbcf7def7879d5067ab989c76..f4b9ee0e966fcd8e264136378d73f7d02b8791d8 100755 (executable)
@@ -9,7 +9,7 @@ my $cgi = CGI->new;
 my $dbh = nms::db_connect();
 
 GD::Image->trueColor(1);
-$img = GD::Image->new('bg2.png');
+$img = GD::Image->new('bg07.png');
 
 my $blk = $img->colorResolve(0, 0, 0);
 
index 95e91989ace2745bcc5e5bf0c37089388130705e..3265b070e7b6e71be10f36fe327c28631ecf28bb 100755 (executable)
@@ -146,7 +146,7 @@ for my $y (0..479) {
 }
 
 
-print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg05.gathering.org/overlay.pl?cam=' . $cam);
+print CGI::header(-type=>'image/png', -refresh=>'10; http://nms.tg07.gathering.org/overlay.pl?cam=' . $cam);
 print $gd->png;
 
 sub get_color {
index 259376e39522f73a024449260de09e853620ff1e..1e2832ecd157aa8e7c36b0c9fe70af5a54fe72c1 100755 (executable)
@@ -9,7 +9,7 @@ my $cgi = CGI->new;
 my $dbh = nms::db_connect();
 
 GD::Image->trueColor(1);
-$img = GD::Image->new('bg2.png');
+$img = GD::Image->new('bg07.png');
 
 my $blk = $img->colorResolve(0, 0, 0);
 
index 86b80effda0fc0856115b9e59eb552fc8a218fbb..2f1bea2cd7ccbc5bd9c84e95ddf685ec94f267ff 100755 (executable)
@@ -14,17 +14,17 @@ my $ua = new LWP::UserAgent;
 $ua->timeout(15);
 $ua->agent('Mozilla/5.0');
 
-#$ua->credentials( "http://zepo.tg05.gathering.org", "/", $uname, $pass );
+#$ua->credentials( "http://zepo.tg07.gathering.org", "/", $uname, $pass );
 
 my $content;
 my %form;
 $form{'userid'} = $uname;
 $form{'next'} = "Look me up";
 
-#my $content = $ua->get("http://zepo.tg05.gathering.org/");
+#my $content = $ua->get("http://zepo.tg07.gathering.org/");
 
 
-$content = $ua->post("http://zepo.tg05.gathering.org/login", \%form);
+$content = $ua->post("http://zepo.tg07.gathering.org/login", \%form);
 
 if (!defined($content->{'_headers'}{'location'})) {
        die "Could not find dudes";
@@ -41,7 +41,7 @@ print Dumper($content);
 $form{'password'} = $pass;
 $form{'userid'} = 39457;
 $form{'next'} = "Log in";
-$content = $ua->post("https://zepo.tg05.gathering.org/enter&got=it", "cookie" => "SID=".$sessioncookie, \%form);
+$content = $ua->post("https://zepo.tg07.gathering.org/enter&got=it", "cookie" => "SID=".$sessioncookie, \%form);
 
 print Dumper($content);
 
index 2399b31677dcb977519315d3db09ac5ff9ac663c..33cad52a7eaac37efcff92c3ae9147053ff33a33 100755 (executable)
@@ -12,7 +12,7 @@ use warnings;
 
 GD::Image->trueColor(1);
 
-my $img = GD::Image->new('bg2.png');
+my $img = GD::Image->new('bg07.png');
 #my $img = GD::Image->new(100,100);
 my $cgi = CGI->new;
 
index 4b12add6d321960188540b954befacd8ebedd17b..8137de9791db675921d8dfc0d51e1fe0186c7226 100755 (executable)
@@ -20,6 +20,6 @@ $img->interlaced('true');
 $img->string(gdMediumBoldFont,0,0,"TG05 - Streaming",$blu);
 
 print $cgi->header(-type=>'image/png',
-                   -refresh=>'10; http://nms.tg05.gathering.org/streaming.pl');
+                   -refresh=>'10; http://nms.tg07.gathering.org/streaming.pl');
 print $img->png;