summaryrefslogtreecommitdiffstats
path: root/etc/inc/services.inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2014-04-12 07:44:29 -0700
committerErmal <eri@pfsense.org>2014-04-14 10:27:22 +0000
commitc30639e445e328879f4df4ce1fc0bcc852ca0d32 (patch)
treec02334c5aa2851170aa3cbfc354352aa7babfbb7 /etc/inc/services.inc
parent33f537179b7314be959484c1d3383cf0bf3a11e0 (diff)
downloadpfsense-c30639e445e328879f4df4ce1fc0bcc852ca0d32.zip
pfsense-c30639e445e328879f4df4ce1fc0bcc852ca0d32.tar.gz
Get real interface when dhcrelay uses default GW
If the DHCP Relay server is not on any local subnet, and not on any subnet that has an internal static route, but is somewhere that no specific route is known, then this code finds the default gateway and uses that in the DHCP relay "-i" parameter. The current code gets just the interface name (like "wan", "opt1"). But DHCP Relay command needs to be fed the actual device name "vr0", "vr1" etc. To break this I simply enabled DHCP Relay, select "LAN" interface, and put Destination Server 1.2.3.4 Making this changed fixed it. Forum: https://forum.pfsense.org/index.php?topic=75010.0
Diffstat (limited to 'etc/inc/services.inc')
-rw-r--r--etc/inc/services.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/inc/services.inc b/etc/inc/services.inc
index ac43688..9ece4a3 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -1462,7 +1462,7 @@ function services_dhcrelay_configure() {
if (is_array($config['gateways']['gateway_item'])) {
foreach ($config['gateways']['gateway_item'] as $gateway) {
if (isset($gateway['defaultgw'])) {
- $destif = $gateway['interface'];
+ $destif = get_real_interface($gateway['interface']);
break;
}
}
OpenPOWER on IntegriCloud