From 6364b88b0b77f5adbcd1a93e7da04f5f6516c5f6 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 14 Apr 2010 13:18:15 +0000 Subject: [PATCH 1/4] Ticket #486. Convert even the gateways that specify the interface itself. --- etc/inc/upgrade_config.inc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index e3a650f9da..da8594ace6 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -785,8 +785,11 @@ function upgrade_042_to_043() { /* Update all filter rules which might reference this gateway */ $j = 0; foreach($config['filter']['rule'] as $rule) { - if(is_ipaddr($rule['gateway']) && ($rule['gateway'] == $config['gateways']['gateway_item'][$i]['gateway'])) { - $config['filter']['rule'][$j]['gateway'] = $config['gateways']['gateway_item'][$i]['name']; + if(is_ipaddr($rule['gateway'])) { + if ($rule['gateway'] == $config['gateways']['gateway_item'][$i]['gateway']) + $config['filter']['rule'][$j]['gateway'] = $config['gateways']['gateway_item'][$i]['name']; + else if ($rule['gateway'] == $ifname) + $config['filter']['rule'][$j]['gateway'] = $config['gateways']['gateway_item'][$i]['name']; } $j++; } From 45a9975025626eaff27b60d5c81cf58bce4beceb Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 14 Apr 2010 13:28:45 +0000 Subject: [PATCH 2/4] Ticket #483. Load the bcmath extension dynamically through PEAR for Radius accounting. --- usr/local/captiveportal/radius_accounting.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/local/captiveportal/radius_accounting.inc b/usr/local/captiveportal/radius_accounting.inc index aea05c8ccf..e60a21724d 100644 --- a/usr/local/captiveportal/radius_accounting.inc +++ b/usr/local/captiveportal/radius_accounting.inc @@ -47,6 +47,8 @@ RADIUS ACCOUNTING START ----------------------- */ +PEAR::loadExtension('bcmath'); + function RADIUS_ACCOUNTING_START($ruleno, $username, $sessionid, $radiusservers, $clientip, $clientmac) { global $config; From 9a38338ca5528a1f7f19e439a7809b89e96aa748 Mon Sep 17 00:00:00 2001 From: Ermal Date: Wed, 14 Apr 2010 14:37:36 +0000 Subject: [PATCH 3/4] Ticket #386. Add even the network address to the list of addresses on proxy arp vips to the naat out edit. --- usr/local/www/firewall_nat_out_edit.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/usr/local/www/firewall_nat_out_edit.php b/usr/local/www/firewall_nat_out_edit.php index 56918b0eb2..45db4bae09 100755 --- a/usr/local/www/firewall_nat_out_edit.php +++ b/usr/local/www/firewall_nat_out_edit.php @@ -434,6 +434,10 @@ any) foreach ($config['virtualip']['vip'] as $sn): if ($sn['mode'] == "proxyarp" && $sn['type'] == "network"): $baseip = ip2long($sn['subnet']) & ip2long(gen_subnet_mask($sn['subnet_bits'])); + $snip = long2ip($baseip); +?> + + Date: Wed, 14 Apr 2010 21:19:16 +0000 Subject: [PATCH 4/4] radius.inc already has this includes so do not include them explicitly. This unbreaks the loading of bcmath module since PEAR.inc is not yet included! --- etc/inc/captiveportal.inc | 2 -- 1 file changed, 2 deletions(-) diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index c05b7af212..33d1b75ecf 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -43,8 +43,6 @@ /* include all configuration functions */ require_once("config.inc"); require_once("functions.inc"); -require_once("radius_authentication.inc"); -require_once("radius_accounting.inc"); require_once("radius.inc"); require_once("voucher.inc");