summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2014-04-12 07:44:29 -0700
committerPhil Davis <phil.davis@inf.org>2014-04-12 07:44:29 -0700
commitd530f8f77da83d8e8dd1ac84c5a42077d52d70c6 (patch)
tree65dfae0697d12405b116afb5f4d196871f41933c
parent5aba8d905ae1a0e2256a8468c25136a62aa69672 (diff)
downloadpfsense-d530f8f77da83d8e8dd1ac84c5a42077d52d70c6.zip
pfsense-d530f8f77da83d8e8dd1ac84c5a42077d52d70c6.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
-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 55db523..570e987 100644
--- a/etc/inc/services.inc
+++ b/etc/inc/services.inc
@@ -1377,7 +1377,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