summaryrefslogtreecommitdiffstats
path: root/etc/inc/shaper.inc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2006-04-24 18:40:17 +0000
committerScott Ullrich <sullrich@pfsense.org>2006-04-24 18:40:17 +0000
commitfa0007151051019fb2862f856480c0fd6847278e (patch)
tree018933ba4f0c5d40e5865ea7de658bad991630e6 /etc/inc/shaper.inc
parent572da981187591b358e696e2a1c924777aa8984f (diff)
downloadpfsense-fa0007151051019fb2862f856480c0fd6847278e.zip
pfsense-fa0007151051019fb2862f856480c0fd6847278e.tar.gz
MFC 11099
Allow WAN and LAN address in shaper rules
Diffstat (limited to 'etc/inc/shaper.inc')
-rw-r--r--etc/inc/shaper.inc15
1 files changed, 15 insertions, 0 deletions
diff --git a/etc/inc/shaper.inc b/etc/inc/shaper.inc
index 37e85dd..4f3b854 100644
--- a/etc/inc/shaper.inc
+++ b/etc/inc/shaper.inc
@@ -422,6 +422,9 @@ function filter_generate_pf_altq_rules() {
continue;
}
+ $lanip = find_interface_ip($config['interfaces']['lan']['if']);
+ $wanip = find_interface_ip(get_real_wan_interface());
+
for ($iif = 0; $iif < $nif; $iif++) {
$direction = 'in';
$line = "pass {$direction} on ";
@@ -452,6 +455,12 @@ function filter_generate_pf_altq_rules() {
$optcfg[$rule['source']['network']]['sn'];
} else {
switch ($rule['source']['network']) {
+ case 'wanip':
+ $src = $wanip;
+ break;
+ case 'lanip':
+ $src = $lanip;
+ break;
case 'lan':
$src = "$lansa/$lansn";
break;
@@ -534,6 +543,12 @@ function filter_generate_pf_altq_rules() {
$optcfg[$rule['destination']['network']]['sn'];
} else {
switch ($rule['destination']['network']) {
+ case 'wanip':
+ $dst = $wanip;
+ break;
+ case 'lanip':
+ $dst = $lanip;
+ break;
case 'lan':
$dst = "$lansa/$lansn";
break;
OpenPOWER on IntegriCloud