Bug #3680
closeddisabling an interface which is part of an interface group puts another (arbitrary) interface into the group instead
100%
Description
Preconditions:
- Assume WAN interface W and VLAN interfaces A,B,C configured.
- Assume an interface group called G which consists of A,B,C
Now go to Interfaces -> B and set interface B to disabled.
Expected behaviour would be that either B remains part of G, or alternatively is removed from G
Actual behaviour is that in place of B, another interface is put into G. In my case it was the WAN interface, so the group G had A,W,C in it after disabling B (with quite messy consequences for the operation of the firewall in my case, as many rules for VLANs were defined based on G, which now became active on the WAN interface as well. Had a lot of fun until I found out what was wrong...)
I assume the interface that is put in place of the disabled interface in the group is just the first from the list (which was the WAN IF in my case).
Updated by Renato Botelho over 10 years ago
I couldn't reproduce it on 2.1.3 and 2.2 recent snapshots. When an interface is disabled, it's removed from group, and re-added when it's re-enabled.
Updated by Lukas Zeller over 10 years ago
I can reproduce the problem in my 2.1.3 productive installation (tried again right now to verify), but I see now there's another step involved:
I had a closer look at what happens in the config.xml - apparently disabling an interface does nothing to the list of interfaces in the group (the disabled interfaces remains listed, which appears ok to me).
However, when opening the Interface Groups Edit page (interfaces_groups_edit.php), at the list position where the disabled interface was before, the popup definitely shows the first interface in the system instead now.
My guess is that because the interface is not active, the popup lookup fails and shows the first interface instead of something like "<disabled>". So far, no harm done, but if I now press "Save" in the Groups Edit page, the current (wrong!) value of the popup will be saved and now that first interface erroneously gets member of the group and ruins the day :-)
Does that make sense?
Updated by Renato Botelho over 10 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 6e73977bd7a542e703d1b05587c434880ef727a9.
Updated by Renato Botelho over 10 years ago
Applied in changeset 22ed6e3eab85f55e993c75a28a772b6e1fc870d8.
Updated by Trond Vindenes over 10 years ago
Tested on "2.2-ALPHA (amd64) built on Thu Aug 14 06:56:40 CDT 2014".
1. Created an interface group.
2. Disabled one of the interface members.
3. Edited the interface group. The disabled interface is still visible and selected in the edit interface group. Clicking Save is also no issue, the correct interfaces are still members.
Issue seems resolved :)
Updated by Renato Botelho over 10 years ago
- Status changed from Feedback to Resolved