Bug #2490


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

Added by Jim Pingle about 10 years ago. Updated almost 10 years ago.

Target version:
Start date:
Due date:
% Done:


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


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 @@
-            <descr><![CDATA[DMZ]]></descr>
+            <descr><![CDATA[OPT1]]></descr>
-            <enable/>
@@ -115,7 +114,7 @@
-            <descr><![CDATA[SYNC]]></descr>
+            <descr><![CDATA[OPT2]]></descr>
@@ -123,7 +122,6 @@
-            <enable/>
@@ -2225,9 +2223,9 @@
-        <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>
@@ -2703,5 +2701,4 @@
-    <dhcpdv6/>

Actions #1

Updated by Ermal Luçi about 10 years ago

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

Updated by Erik Fonnesbeck about 10 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 about 10 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 about 10 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 about 10 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 almost 10 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF