Project

General

Profile

Bug #7380

WAN DHCP Gateway Outside of Subnet Causing Route Issues

Added by Doran Smestad over 3 years ago. Updated 6 months ago.

Status:
Resolved
Priority:
Normal
Category:
Gateways
Target version:
Start date:
03/12/2017
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4
Affected Architecture:

Description

When deploying PFSense in OVH's public cloud, they assign a IPv4 address via DHCP in a /32 subnet. Naturally, with such a captive subnet, the default gateway will reside outside of the subnet. This causes problems with the /usr/local/sbin/pfSense-dhclient-script.

As it is currently written, the script will attempt to add the default route via: $ROUTE add default $router (see https://github.com/pfsense/pfsense/blob/master/src/usr/local/sbin/pfSense-dhclient-script#L232). Since the gateway is outside of the subnet, there is no route to reach said gateway, causing the route assignment to fail and thus no connectivity.

I fixed this in my copy of the 2.4 PFSense March 11 nightly build by adding a line to add a host route to the gateway on the particular interface. See my branch here: https://github.com/doransmestad/pfsense/blob/ds-dhcp-gw-out-of-subnet/src/usr/local/sbin/pfSense-dhclient-script#L240.

I opened this bug on Redmine to provide some tracking of the issue, and this being my first experience contributing to PFSense, I wasn't sure if you all would be receptive to a pull request out of nowhere. Please let me know how you would like me to proceed.

Thanks!

Associated revisions

Revision 9fde2b2b (diff)
Added by Viktor Gurov 8 months ago

Handle DHCP Lease when the assigned Gateway is Outside of Subnet. Issue #7380

History

#1 Updated by Jim Thompson over 3 years ago

  • Category set to Gateways
  • Assignee set to Renato Botelho

Assigned to Renato for evaluation.

Actual diff is here:

https://github.com/doransmestad/pfsense/commit/d79a4678376d7246b842bba119a86e771ad0fcc7

Seems like potential large impact(s) on 2.4.0 Will need a PR and signed CLA prior to integration

#2 Updated by Doran Smestad over 3 years ago

Thanks Jim. Apologies for not linking the diff the first time around.

I've signed the CLA and submitted a pull request: https://github.com/pfsense/pfsense/pull/3651.

Thanks,
Doran

#3 Updated by Jim Pingle about 1 year ago

PR was closed due to timeout, requested changes were not made in a timely manner.

#5 Updated by Jim Pingle 8 months ago

  • Status changed from New to Pull Request Review

#6 Updated by Renato Botelho 8 months ago

  • Status changed from Pull Request Review to Feedback
  • Target version set to 2.5.0
  • % Done changed from 0 to 100

PR has been merged. Thanks!

#7 Updated by Viktor Gurov 6 months ago

  • Status changed from Feedback to Resolved

works as expected on 2.5.0.a.20200426.2333

I can see local route to the router ip address, like:

default            10.1.0.1           UGS      vtnet1
10.1.0.1           0c:dd:ae:ed:96:01  UHS      vtnet1

Also available in: Atom PDF