Project

General

Profile

Bug #5135

interface_has_gateway returns true for DHCP where it doesn't assign gateway

Added by David Freedman over 3 years ago. Updated over 3 years ago.

Status:
Confirmed
Priority:
Very Low
Assignee:
-
Category:
Interfaces
Target version:
-
Start date:
09/14/2015
Due date:
% Done:

0%

Estimated time:
Affected Version:
All
Affected Architecture:
All

Description

interface_has_gateway() returns true for DHCP interfaces, it does not consider whether DHCP hands out a gateway or not, unfortunately this means that LAN interfaces which are DHCP numbered (but without a gateway) will not get automatic NAT config. This happens in filter_nat_rules_automatic_tonathosts() (filter.inc) when "if(interface_has_gateway($ocname)) {" is evaluated.
Not sure if get_interface_gateway() (gwlb.inc) should be used instead to check for the presence of a gateway since this appears to support dynamic interfaces (whereas , interface_has_gateway() seems to hardcode most stuff).

History

#1 Updated by Chris Buechler over 3 years ago

  • Subject changed from interface_has_gateway returns true for dhcp to interface_has_gateway returns true for DHCP where it doesn't assign gateway
  • Status changed from New to Confirmed
  • Priority changed from Normal to Very Low

You're possibly the only person on earth for whom that isn't a safe assumption. Generally a bad idea to DHCP assign your gateway's IPs.

#2 Updated by David Freedman over 3 years ago

I'm afraid the world has changed! DHCP is prevalent on cloud implementations and is used to configure the guest according to the specified parameters of the environment or build. We have customers that deploy the pfSense image and both the WAN and LAN interfaces are autoconfigured as a result of our deployment system. This means their 'out-of-the-box' experience for the pfSense image is that it doesn't work, since the automatic outbound NAT isn't functional. I would appreciate if you could raise the priority given the real concerns here, I'm happy to bring other service provider experiences into this discussion.

Also available in: Atom PDF