OPNsense Forum

English Forums => 24.7, 24.10 Legacy Series => Topic started by: JakubJB on October 09, 2024, 02:12:22 PM

Title: "Maximum IKEv1 phase 2 exchanges" is a check box, not a value field
Post by: JakubJB on October 09, 2024, 02:12:22 PM
Hi!I need to change "Maximum IKEv1 phase 2 exchanges" aka max_ikev1_xchanges, but it's not a value field.
It's a checkbox, which is unchecked even if You check it, apply, open the section again.
Screenshot attached.

What do I miss?
Title: Re: "Maximum IKEv1 phase 2 exchanges" is a check box, not a value field
Post by: Monviech (Cedrik) on October 09, 2024, 02:45:03 PM
The problem seems to be that its an IntegerField

https://github.com/opnsense/core/blob/d172f15cebb7fad9d5f93305d16ca8dde2cb07b3/src/opnsense/mvc/app/models/OPNsense/IPsec/IPsec.xml#L25

But the the frontend has a checkbox for it configured:

https://github.com/opnsense/core/blob/d172f15cebb7fad9d5f93305d16ca8dde2cb07b3/src/opnsense/mvc/app/controllers/OPNsense/IPsec/forms/settings.xml#L4C17-L11

Edit: Second issue is that its in ipsec.general.max_ikev1_exchanges but the model field is in "ipsec.charon..." thats why it can not be saved.

I'll try to fix that for you.

EDIT: PR: https://github.com/opnsense/core/pull/7957
Title: Re: "Maximum IKEv1 phase 2 exchanges" is a check box, not a value field
Post by: JakubJB on October 10, 2024, 07:40:07 AM
Thx.