diff options
author | jeff <jeff> | 2006-12-07 02:40:32 +0000 |
---|---|---|
committer | jeff <jeff> | 2006-12-07 02:40:32 +0000 |
commit | 6194551336a925ae5455cede68a7f73660b06bb6 (patch) | |
tree | 54be12685fdfcc4b3da1ccfca8a42bff1a2b128c /FS/FS/svc_broadband.pm | |
parent | 571d5e87ffc63a155072dab88fba16d5918cc57d (diff) |
retouch bandwidth countdown
Diffstat (limited to 'FS/FS/svc_broadband.pm')
-rwxr-xr-x | FS/FS/svc_broadband.pm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/FS/FS/svc_broadband.pm b/FS/FS/svc_broadband.pm index aaac891..f4cc794 100755 --- a/FS/FS/svc_broadband.pm +++ b/FS/FS/svc_broadband.pm @@ -154,12 +154,24 @@ sub check { || $self->ut_number('speed_up') || $self->ut_number('speed_down') || $self->ut_ipn('ip_addr') + || $self->ut_hexn('mac_addr') + || $self->ut_numbern('vlan') ; return $error if $error; if($self->speed_up < 0) { return 'speed_up must be positive'; } if($self->speed_down < 0) { return 'speed_down must be positive'; } + if($self->vlan < 0 || $self->vlan > 4096) { # apropos? + return 'vlan is out of range'; } + + if($self->latitude < -90 || $self->latitude > 90) { + return 'latitude must be between -90 and 90'; + } + if($self->longitude < -180 || $self->longitude > 180) { + return 'longitude must be between -180 and 180'; + } + if (not($self->ip_addr) or $self->ip_addr eq '0.0.0.0') { my $next_addr = $self->addr_block->next_free_addr; if ($next_addr) { |