summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorSeth Mos <seth.mos@xs4all.nl>2007-10-19 20:11:51 +0000
committerSeth Mos <seth.mos@xs4all.nl>2007-10-19 20:11:51 +0000
commitb11353e7af2661adcdb8126ed94504d541f61c5f (patch)
tree98dee130d060ca9ce00e4ae4fa6126e2731ff277 /etc
parent402a813bd85306fa7d5e3e09449403abc679085b (diff)
downloadpfsense-b11353e7af2661adcdb8126ed94504d541f61c5f.zip
pfsense-b11353e7af2661adcdb8126ed94504d541f61c5f.tar.gz
Lookup the gateway ip for rules which reference gateways by name
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/filter.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index 653ccd7..79d75ec 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -1786,11 +1786,11 @@ function generate_user_filter_rule($rule, $ngcounter) {
}
} else {
/* user picked a real gateway ip */
- if(is_ipaddr($rule['gateway'])) {
- $gatewayip = $rule['gateway'];
+ $gatewayip = lookup_gateway_ip_by_name($rule['gateway']);
+ if(is_ipaddr($gatewayip)) {
$int = guess_interface_from_ip($gatewayip);
- $aline['route'] = " route-to ( " . guess_interface_from_ip($rule['gateway']) . " {$rule['gateway']} ) ";
- }
+ $aline['route'] = " route-to ( " . guess_interface_from_ip($gatewayip) . " {$gatewayip} ) ";
+ }
}
}
}
OpenPOWER on IntegriCloud