Bug #2065
closed
PHP Warning on Interface Creation (master/IPv6 branch)
Added by Moshe Katz almost 13 years ago.
Updated almost 12 years ago.
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
- Target version set to 2.1
- Affected Version set to 2.1
Note that this is with master as of about 1/2 hour 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).
- Status changed from New to Resolved
Ran into this issue as well, added a is_array() check for the DHCPdv6 array.
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..."
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
Also available in: Atom
PDF