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

[unmanaged] Handling of unmanaged sections modifies the order of sections #64

Open
okraits opened this issue Sep 24, 2018 · 7 comments
Open

Comments

@okraits
Copy link
Member

okraits commented Sep 24, 2018

The handling of unmanaged sections (store/restore) currently doesn't take the order of sections into account. In the firewall config this can lead to a modified order of rules and thus to a different behaviour.

@nemesifier
Copy link
Member

#65 is merged, now we should remember to change the default unmanaged value so this feature is disabeld because I believe almost nobody is using it.

@nemesifier
Copy link
Member

Now that #67 is done, I was thinking to close this but maybe we leave it open because the issue is not really resolved? We just worked around it by disabling it since it's probably not used very much. But if someone uses it on configuration that need to maintain their order they'll incur in this issue.

@okraits
Copy link
Member Author

okraits commented Sep 25, 2018

👍
Yes, this still needs to be fixed. Maybe the handling of unmanaged sections needs to be changed in general - I don't see any easy solution to prevent reordering of sections with the way it's done right now.

@nemesifier
Copy link
Member

@okraits I think the index can be stored and sections can be re-inserted in the same place, but there's no advantage for us in doing this now since we don't use this feature

@okraits
Copy link
Member Author

okraits commented Sep 26, 2018

Yes, indexes need to be stored in any case. I guess there could be scenarios where the configuration update modifies the order of sections (or creates new sections) so that a collision happens between the indexes of the unmanaged sections and the indexes of the rest of the configuration.

But we need to look into that anyway when we tackle this issue.

@Gobiviswa
Copy link

Hi,
It is not the same issue, but could be related. When configurations downloaded by the openwisp, I want to skip some parameters of the configurations which I am using for internal purpose not for device configuration. For example, I have a parameter named 'id' for all the sections in firewall and I want to remove that when wisp downloading it.Hope I am clear. Is there any way to do it? Thanks.

@okraits
Copy link
Member Author

okraits commented May 9, 2019

I think you can only declare whole sections and specific section types as unmanaged section, not single options.
What are those id parameters for? What do you want to achieve with them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do (OpenWRT)
Development

No branches or pull requests

3 participants