X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fsvc_IP_Mixin.pm;h=8b2b5f17e9709e73fdb8d8f00b89d263fd74164c;hb=3cbdd85a96348a287623e3b97c937c7749e99392;hp=abafe86adea2406fec39d3af821281a6ac8fb0be;hpb=65573c262573834104caa1bad0d2867150b8a12e;p=freeside.git diff --git a/FS/FS/svc_IP_Mixin.pm b/FS/FS/svc_IP_Mixin.pm index abafe86ad..8b2b5f17e 100644 --- a/FS/FS/svc_IP_Mixin.pm +++ b/FS/FS/svc_IP_Mixin.pm @@ -186,7 +186,9 @@ means "Framed-Route" if there's an attached router. sub radius_reply { my $self = shift; + my %reply = (); + if ( my $block = $self->attached_block ) { # block routed over dynamic IP: "192.168.100.0/29 0.0.0.0 1" # or @@ -196,21 +198,9 @@ sub radius_reply { ($self->ip_addr || '0.0.0.0') . ' 1'; } - if ( $self->router_routernum && FS::Conf->new->exists('radius-canopy') ) { - - my @addr_block = - qsearch('addr_block', { routernum => $self->router_routernum } ); - if ( @addr_block ) { - - #? - warn "Multiple address blocks attached to this service's router; using first" - if scalar(@addr_block) > 1; + $reply{'Motorola-Canopy-Gateway'} = $self->addr_block->ip_gateway + if FS::Conf->new->exists('radius-canopy') && $self->addr_block; - $reply{'Motorola-Canopy-Gateway'} = $addr_block[0]->ip_gateway - - } - - } %reply; }