Project

General

Profile

Actions

Bug #2490

closed

Reassigning interfaces on console during restore causes them to be disabled, lose descriptions

Added by Jim Pingle over 12 years ago. Updated over 12 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Interfaces
Target version:
Start date:
06/11/2012
Due date:
% Done:

100%

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

Description

When restoring a config, and reassigning interfaces at the console, somehow this happens:
  • LAN/WAN are OK
  • OPT interfaces are disabled
  • OPT interfaces have lost their descriptions (custom names)

The latter two are quite bad situations to land in, especially if you manage the GUI from one of those OPT interfaces.
(This happens on current 2.1 snapshots, but may be an even older problem)

In the config history it has quite an unhelpful description, "(system): made unknown change".

Config diff when this happens:

$ diff -u /conf/backup/config-1339430243.xml /conf/backup/config-1339430374.xml
--- /conf/backup/config-1339430243.xml    2012-06-11 11:59:34.000000000 -0400
+++ /conf/backup/config-1339430374.xml    2012-06-11 12:43:19.000000000 -0400
@@ -102,11 +102,10 @@
             <gatewayv6>WANGWv6</gatewayv6>
         </wan>
         <opt1>
-            <descr><![CDATA[DMZ]]></descr>
+            <descr><![CDATA[OPT1]]></descr>
             <if>em1</if>
             <bridge/>
             <spoofmac/>
-            <enable/>
             <disableftpproxy/>
             <ipaddr>68.76.213.194</ipaddr>
             <subnet>26</subnet>
@@ -115,7 +114,7 @@
             <dhcp6-pd-sla-id>none</dhcp6-pd-sla-id>
         </opt1>
         <opt2>
-            <descr><![CDATA[SYNC]]></descr>
+            <descr><![CDATA[OPT2]]></descr>
             <if>fxp1</if>
             <bridge/>
             <ipaddr>192.168.150.15</ipaddr>
@@ -123,7 +122,6 @@
             <gateway/>
             <spoofmac/>
             <mtu/>
-            <enable/>
             <disableftpproxy/>
         </opt2>
     </interfaces>
@@ -2225,9 +2223,9 @@
         <tab/>
     </installedpackages>
     <revision>
-        <description><![CDATA[admin@192.168.x.x: /interfaces_assign.php made unknown change]]></description>
-        <time>1339430354</time>
-        <username>admin@192.168.x.x</username>
+        <description><![CDATA[(system):  made unknown change]]></description>
+        <time>1339430374</time>
+        <username>(system)</username>
     </revision>
     <virtualip>
         <vip>
@@ -2703,5 +2701,4 @@
         <synchronizednsforwarder>on</synchronizednsforwarder>
         <synchronizecaptiveportal>on</synchronizecaptiveportal>
     </hasync>
-    <dhcpdv6/>
 </pfsense>

Actions #1

Updated by Ermal Luçi over 12 years ago

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

Updated by Erik Fonnesbeck over 12 years ago

Is there any reason to ever unset the "enable" setting there? Is not the "enable" setting only set for opt interfaces when there is an existing configuration? The code looks like afterward it removes the opt interfaces you did not configure anyway, so I do not see any point in doing this.

Actions #3

Updated by Ermal Luçi over 12 years ago

If descr is set the enable will not be removed.
For historic reason i left it there!

Please move on.

Actions #4

Updated by Erik Fonnesbeck over 12 years ago

The reason I asked is that interfaces.php lets you store a blank descr in the config to get the default name.

Actions #5

Updated by Chris Buechler over 12 years ago

I don't see a reason to ever unset enable there, why is that there? Is that only if you re-assign interfaces and don't assign the OPTs then it disables them? In that case it's fine, short of that I don't see a reason to disable.

Actions #6

Updated by Jim Pingle over 12 years ago

  • Status changed from Feedback to Resolved
Actions

Also available in: Atom PDF