[freeside-commits] branch FREESIDE_3_BRANCH updated. fee90e01f8fa5ee58153b558b3a2129982bee1cb

Ivan ivan at 420.am
Wed Mar 30 13:02:33 PDT 2016


The branch, FREESIDE_3_BRANCH has been updated
       via  fee90e01f8fa5ee58153b558b3a2129982bee1cb (commit)
      from  75159fa6df40171b78d19c1edaeb15d815b0b68b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fee90e01f8fa5ee58153b558b3a2129982bee1cb
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Wed Mar 30 13:02:32 2016 -0700

    set Motorola-Canopy-Gateway, RT#41261

diff --git a/FS/FS/svc_IP_Mixin.pm b/FS/FS/svc_IP_Mixin.pm
index c0f202e..abafe86 100644
--- a/FS/FS/svc_IP_Mixin.pm
+++ b/FS/FS/svc_IP_Mixin.pm
@@ -5,6 +5,8 @@ use strict;
 use NEXT;
 use FS::Record qw(qsearchs qsearch);
 use FS::Conf;
+use FS::router;
+use FS::part_svc_router;
 
 =item addr_block
 
@@ -192,9 +194,21 @@ sub radius_reply {
     # (the "1" at the end is the route metric)
     $reply{'Framed-Route'} = $block->cidr . ' ' .
                              ($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'} = $block->ip_gateway
-      if FS::Conf->new->exists('radius-canopy');
+      $reply{'Motorola-Canopy-Gateway'} = $addr_block[0]->ip_gateway
+
+    }
     
   }
   %reply;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/svc_IP_Mixin.pm |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list