Project

General

Profile

Actions

Bug #2065

closed

PHP Warning on Interface Creation (master/IPv6 branch)

Added by Moshe Katz almost 13 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
12/27/2011
Due date:
% Done:

0%

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

Description

When assigning a new GIF tunnel to an interface (in this case OPT3), I get the following PHP warning at the top of the page:

Warning: Invalid argument supplied for foreach() in /etc/inc/system.inc on line 266

The interface shows up in the interfaces list but I cannot actually enable it. Here is the error that I get when I check the box to enable the interface and click 'save'.

The DHCP Server is active on this interface and it can be used only with a static IP configuration. Please disable the DHCP Server service on this interface first, then change the interface configuration.

Needless to say, the interface appears nowhere in the DHCP configuration that I could find.


Files

interfaces.php.patch (1.03 KB) interfaces.php.patch Dwayne Voelker, 02/17/2013 11:25 AM
Actions #1

Updated by Chris Buechler almost 13 years ago

  • Target version set to 2.1
  • Affected Version set to 2.1
Actions #2

Updated by Moshe Katz almost 13 years ago

Note that this is with master as of about 1/2 hour ago

Actions #3

Updated by Moshe Katz almost 13 years ago

Note that the interface is actually working correctly.

The issue with the error message is for a separate reason (for which I may open a new ticket after I test it more).

Actions #4

Updated by Seth Mos over 12 years ago

  • Status changed from New to Resolved

Ran into this issue as well, added a is_array() check for the DHCPdv6 array.

Actions #5

Updated by Dwayne Voelker almost 12 years ago

I have run into something very much like this (see http://forum.pfsense.org/index.php/topic,58966.0.html )

Trying to remove a static IPv6 address from LAN interface or change it to DHCP6/SLAAC gets me a similar error: "... Please disable the DHCPv6 Server service on this interface first..."

Actions #6

Updated by Dwayne Voelker almost 12 years ago

I have found at least a workaround for my issue, patch is included.

In /usr/local/www/interfaces.php the code that generates this error checks for $config['dhcpd6'] instead of $config['dhcpdv6']

I am not sure if the dhcpd6 block in config.xml is used or is just old stuff that is still hanging around. I do know that if i delete it manually from config.xml it gets regenerated when you click save from Services -> DHCPv6 Server/RA - complete with the <enable/> block...

Someone who knows better should probably find out if just checking for <enable/> in dhcpdv6 is enough to say that the dhcpdv6/dhcpd6 server is not active on the interface, but this works for my system

Actions

Also available in: Atom PDF