From c30639e445e328879f4df4ce1fc0bcc852ca0d32 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Sat, 12 Apr 2014 07:44:29 -0700 Subject: 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 --- etc/inc/services.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } } -- cgit v1.1