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

Also available in: Atom PDF