85 |
my $mac = shift; |
my $mac = shift; |
86 |
$mac = format::mac($mac); |
$mac = format::mac($mac); |
87 |
|
|
88 |
if ( $server::new_clients-- ) { |
if ( $server::new_clients > 0 ) { |
89 |
warn "# clients left: $server::new_clients\n"; |
warn "# clients left: ", --$server::new_clients; |
90 |
} else { |
} else { |
91 |
warn "W: no new clients accepted"; |
warn "W: no new clients accepted"; |
92 |
return '0.0.0.0'; |
return '0.0.0.0'; |
113 |
sub save_ip_mac { |
sub save_ip_mac { |
114 |
my ($ip,$mac) = @_; |
my ($ip,$mac) = @_; |
115 |
$mac = format::mac($mac); |
$mac = format::mac($mac); |
116 |
return if $mac eq '00:00:00:00:00:00'; |
return if $mac eq '00:00:00:00:00:00' || $ip eq '0.0.0.0'; |
117 |
|
|
118 |
mkdir ip_path($ip) unless -e ip_path($ip); |
mkdir ip_path($ip) unless -e ip_path($ip); |
119 |
|
|