Project

General

Profile

Actions

Bug #2827

closed

changing "IPv6 Configuration Type" dropdown results in error if you have an old config.xml with unmigrated <dhcpd6> block

Added by Dwayne Voelker almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Normal
Category:
DHCP (IPv6)
Target version:
Start date:
02/19/2013
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.1-IPv6
Affected Architecture:

Description

I have upgraded my 2.1 from snapshot to snapshot for quite a long time and I now have accumulated 2 IPv6 dhcpd blocks in my config.xml. The old one is <dhcpd6> and has been there since at least https://github.com/bsdperimeter/pfsense/commit/e029943a103a2c702e79096921ecfa0ae21ac489

I'm not sure when it changed from <dhcpd6> to <dhcpdv6> but my config.xml doesn't seem to have been upgraded, I apparently just added a new <dhcpdv6> and continued on. I have just noticed that if I try to change from the current static IPv6 ip address to anything else (or just change the IPv6 address type) on the LAN interface i get this error:

The following input errors were detected:
The DHCP6 Server is active on this interface and it can be used only with a static IPv6 configuration. Please disable the DHCPv6 Server service on this interface first, then change the interface configuration.

The reason for this is because of the old <dhcpd6> block which has an <enable/> and gets re-added if I delete it manually.
If I change line 435 in /usr/local/www/interfaces.php from:

if (isset($config['dhcpd6']) && isset($config['dhcpd6'][$if]['enable']) && (! preg_match("/^staticv6/", $_POST['type6'])))

to:

if (isset($config['dhcpdv6']) && isset($config['dhcpdv6'][$if]['enable']) && (! preg_match("/^staticv6/", $_POST['type6'])))

It solves this problem, although the <dhcpd6> block is still in config.xml . It just doesn't get checked anymore.

if you grep through the code for dhcpd6 and dhcpdv6 you will see tons of dhcpdv6 but dhcpd6 is in only the one file, apart from references to dhcpd6.leases so I guess it's not really used anymore.

oops I just did another check and dhcpd6 is also used in /etc/rc.initial.setlanip so it's probably a bit more complicated than changing interfaces.php

PS. I previously added this all to the end of closed issue [[http://redmine.pfsense.org/issues/2065]] which is not the same problem, so I realized that I should open a new one... Sorry about that.


Files

interfaces.php.patch (1.03 KB) interfaces.php.patch Dwayne Voelker, 02/19/2013 03:55 PM
Actions #1

Updated by Renato Botelho almost 9 years ago

  • Assignee set to Renato Botelho
  • Target version set to 2.1
Actions #2

Updated by Renato Botelho almost 9 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #3

Updated by Renato Botelho almost 9 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF