[freeside-commits] branch master updated. 7109ab0b7108ee365fbc958eaaf9e473f2332c08

Ivan ivan at 420.am
Mon Mar 21 18:00:35 PDT 2016


The branch, master has been updated
       via  7109ab0b7108ee365fbc958eaaf9e473f2332c08 (commit)
      from  6abdcf7164e4cdebd70fc4862922b8e521c48557 (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 7109ab0b7108ee365fbc958eaaf9e473f2332c08
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Mar 21 18:00:34 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 5b06082..c0f202e 100644
--- a/FS/FS/svc_IP_Mixin.pm
+++ b/FS/FS/svc_IP_Mixin.pm
@@ -1,9 +1,10 @@
 package FS::svc_IP_Mixin;
+use base 'FS::IP_Mixin';
 
 use strict;
-use base 'FS::IP_Mixin';
-use FS::Record qw(qsearchs qsearch);
 use NEXT;
+use FS::Record qw(qsearchs qsearch);
+use FS::Conf;
 
 =item addr_block
 
@@ -183,16 +184,18 @@ means "Framed-Route" if there's an attached router.
 
 sub radius_reply {
   my $self = shift;
-  my %reply;
-  my ($block) = $self->attached_block;
-  if ( $block ) {
+  my %reply = ();
+  if ( my $block = $self->attached_block ) {
     # block routed over dynamic IP: "192.168.100.0/29 0.0.0.0 1"
     # or
     # block routed over fixed IP: "192.168.100.0/29 192.168.100.1 1"
     # (the "1" at the end is the route metric)
-    $reply{'Framed-Route'} =
-    $block->cidr . ' ' .
-    ($self->ip_addr || '0.0.0.0') . ' 1';
+    $reply{'Framed-Route'} = $block->cidr . ' ' .
+                             ($self->ip_addr || '0.0.0.0') . ' 1';
+
+    $reply{'Motorola-Canopy-Gateway'} = $block->ip_gateway
+      if FS::Conf->new->exists('radius-canopy');
+    
   }
   %reply;
 }

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

Summary of changes:
 FS/FS/svc_IP_Mixin.pm |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)




More information about the freeside-commits mailing list