Project

General

Profile

Actions

Bug #5135

closed

DHCP interfaces are always treated as having a gateway, even if one is not assigned by the upstream DHCP server

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

Status:
Closed
Priority:
Very Low
Assignee:
Viktor Gurov
Category:
Interfaces
Target version:
Start date:
09/14/2015
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
21.05
Release Notes:
Default
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).

Actions #1

Updated by Chris Buechler over 8 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.

Actions #2

Updated by David Freedman over 8 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.

Actions #4

Updated by Jim Pingle over 3 years ago

  • Status changed from Confirmed to Pull Request Review
  • Target version set to CE-Next
Actions #5

Updated by Renato Botelho about 3 years ago

  • Status changed from Pull Request Review to Feedback
  • Assignee set to Viktor Gurov

PR has been merged. Thanks!

Actions #6

Updated by Viktor Gurov about 3 years ago

  • % Done changed from 0 to 100
Actions #7

Updated by Jim Pingle about 3 years ago

  • Target version changed from CE-Next to 2.6.0
Actions #8

Updated by Jim Pingle almost 3 years ago

  • Plus Target Version set to 21.05
Actions #9

Updated by Jim Pingle almost 3 years ago

Already in 21.05 branch.

Actions #10

Updated by Jim Pingle almost 3 years ago

  • Subject changed from interface_has_gateway returns true for DHCP where it doesn't assign gateway to DHCP interfaces are always treated as having a gateway, even if one is not assigned by the upstream DHCP server

Updating subject for release notes.

Actions #11

Updated by Jim Pingle almost 3 years ago

  • Target version changed from 2.6.0 to 2.5.2
Actions #12

Updated by Jim Pingle almost 3 years ago

  • Status changed from Feedback to Closed
Actions

Also available in: Atom PDF