Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: delete vip "hides" other entries #2911

Closed
fichtner opened this issue Nov 12, 2018 · 15 comments
Closed

config: delete vip "hides" other entries #2911

fichtner opened this issue Nov 12, 2018 · 15 comments
Assignees
Labels
bug Production bug
Milestone

Comments

@fichtner
Copy link
Member

fichtner commented Nov 12, 2018

Not entirely sure if this can be reproduced so for now just record what happened: it fits the "entries disappeared" reports that happen sporadically... I was using "die;" for debuggin in a POST request. Removed "die;", hit reload and resubmit in the browser and that happened:

--- /conf/backup/config-1542039272.2488.xml	2018-11-12 17:14:32.249928000 +0100
+++ /conf/backup/config-1542039332.9464.xml	2018-11-12 17:15:32.947471000 +0100
@@ -1165,8 +1165,8 @@
     <filterlogentriesacts>Pass Block Reject</filterlogentriesacts>
   </widgets>
   <revision>
-    <time>1542039239.9586</time>
-    <description>/firewall_virtual_ip_edit.php made changes</description>
+    <time>1542039272.25</time>
+    <description>/firewall_virtual_ip.php made changes</description>
     <username>franco@10.0.0.11</username>
   </revision>
   <openvpn>
@@ -3128,27 +3128,21 @@
   </wol>
   <virtualip>
     <vip>
-      <type>single</type>
-      <subnet_bits>8</subnet_bits>
-      <mode>ipalias</mode>
-      <interface>lo0</interface>
-      <descr>testing</descr>
-      <subnet>127.0.0.2</subnet>
-    </vip>
-    <vip>
-      <type>single</type>
-      <subnet_bits>24</subnet_bits>
-      <mode>ipalias</mode>
-      <interface>wan</interface>
-      <descr>Mock</descr>
-      <subnet>192.168.2.42</subnet>
-    </vip>
-    <vip>
-      <type>single</type>
-      <subnet_bits>64</subnet_bits>
-      <mode>ipalias</mode>
-      <interface>lan</interface>
-      <subnet>::123</subnet>
+      <vip>
+        <type>single</type>
+        <subnet_bits>8</subnet_bits>
+        <mode>ipalias</mode>
+        <interface>lo0</interface>
+        <descr>testing</descr>
+        <subnet>127.0.0.2</subnet>
+      </vip>
+      <vip>
+        <type>single</type>
+        <subnet_bits>64</subnet_bits>
+        <mode>ipalias</mode>
+        <interface>lan</interface>
+        <subnet>::123</subnet>
+      </vip>
     </vip>
   </virtualip>
   <staticroutes/>

Maybe also reported via: https://forum.opnsense.org/index.php?topic=10276.0
Offending issue could be: bd148f1

@fichtner fichtner added the bug Production bug label Nov 12, 2018
@fichtner fichtner self-assigned this Nov 12, 2018
@fichtner
Copy link
Member Author

@AdSchellevis maybe you could look at this, I'm suspecting bd148f1 again, I have it queued up for 18.7.8 but the forum thread makes me worry...

@mstrdraco
Copy link

I'm having similar issues when I delete rules it's wiping out my entire Rule list for all firewall rules.

@AdSchellevis
Copy link
Member

@mstrdraco which version?

@AdSchellevis
Copy link
Member

@fichtner I'll take it, it looks like I can reproduce the issue.

@mstrdraco
Copy link

mstrdraco commented Nov 16, 2018

Versions OPNsense 19.1.b_167-amd64
FreeBSD 11.1-RELEASE-p15
OpenSSL 1.0.2p 14 Aug 2018

I was running 18.7.7 and switched up to the Beta Chanel.
My URL with details is - https://forum.opnsense.org/index.php?topic=10276.0

@AdSchellevis
Copy link
Member

@mstrdraco ok, thanks, same issue then indeed.

@fichtner fichtner added this to the 19.1 milestone Nov 16, 2018
@fichtner
Copy link
Member Author

@mstrdraco @AdSchellevis thanks ❤️

@AdSchellevis
Copy link
Member

@fichtner found the culprit, unset() doesn't reindex, which kills https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/library/OPNsense/Core/Config.php#L80

It's just very stupid that you can't distinct associative and sequential arrays easily.

@mstrdraco
Copy link

Happy to Help and thanks for all you do @fichtner @AdSchellevis

@fichtner
Copy link
Member Author

is this also related to the "listtag" thing?

@AdSchellevis
Copy link
Member

it's in the same corner, yes

AdSchellevis added a commit that referenced this issue Nov 16, 2018
Should be more like the original approach now, performance seems to equal the previous take.
@AdSchellevis
Copy link
Member

0df2434 should fix the problem.

@fichtner
Copy link
Member Author

@mstrdraco you can try the patch from the command line:

# opnsense-patch 0df2434

@mstrdraco
Copy link

Worked great! Thank you

@fichtner
Copy link
Member Author

perfect, thanks. will be in the next devel update 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

3 participants