OPNsense Forum

English Forums => 26.7 Series => Topic started by: mrzaz on October 02, 2026, 11:34:09 PM

Title: Bug found in Edit rule at "Source" when selecting anything before "Single Host."
Post by: mrzaz on October 02, 2026, 11:34:09 PM
Hello,
I am running latest "OPNsense 26.7.5-amd64" found a "bug" in "Edit rule" under "Source" when
first selecting "LAN Network" and later multiselect "Single host or network" and add anything.

Then the "LAN Network" is removed and only stores the "Single host or network".
If I then multiselect again and select "LAN Network" then both is stored.
Seems like when I have multiselect anything before "Single host or network" it gets removed
regardless what is entered.

One more interesting thing is that the default edit field for "Single host or network" is "lan".
Regardless if I enter a network/24 beside the "lan" or remove "lan" and enter network/24
the previously selected "LAN Network" gets unselected.

If I later select source again and again select "LAN Network" then both is multiselected OK.

Have not tested all combinations but seems to be an issue with this multiselect handling.
Could possible be in all multiselect inputs that contains "Single host or network".

I included 2 screenshots inline and rest in the zip.

Best regards
Dan Lundqvist
Stockholm, Sweden
Title: Re: Bug found in Edit rule at "Source" when selecting anything before "Single Host."
Post by: Patrick M. Hausen on October 03, 2026, 09:31:11 AM
When you select "single host or network" you are supposed to enter an IP address or network manually. When you select any predefined alias, e.g. "LAN net" the type is implicit.
Title: Re: Bug found in Edit rule at "Source" when selecting anything before "Single Host."
Post by: mrzaz on October 03, 2026, 10:35:53 AM
Quote from: Patrick M. Hausen on Today at 09:31:11 AMWhen you select "single host or network" you are supposed to enter an IP address or network manually. When you select any predefined alias, e.g. "LAN net" the type is implicit.

Yes, i understand that.

But why I reported this is the fact that selecting a predefined object first in a multiselect option and later select an object that requires an input, the previous selected item in the multiselect is removed.

If I select the object which requires input first and then  select the predefined as second it stores both.

It shouldn't matter in what order you select them.

Best regards
Dan Lundqvist
Stockholm,Sweden
Title: Re: Bug found in Edit rule at "Source" when selecting anything before "Single Host."
Post by: Patrick M. Hausen on October 03, 2026, 11:36:54 AM
I wasn't aware you could do both in one rule. Always used it as either - or.
Title: Re: Bug found in Edit rule at "Source" when selecting anything before "Single Host."
Post by: bamf on October 03, 2026, 12:16:56 PM
This is not a bug. Create an Alias if you want to combine entries.
Title: Re: Bug found in Edit rule at "Source" when selecting anything before "Single Host."
Post by: mrzaz on October 03, 2026, 12:30:35 PM
Quote from: Patrick M. Hausen on Today at 11:36:54 AMI wasn't aware you could do both in one rule. Always used it as either - or.

Apparently it is working as a multiselect function.

If you do the input function first and then select the predefined after it works OK but if you select the predefined first and then selected the input function it removes the predefined function.

Dan Lundqvist
Stockholm, Sweden
Title: Re: Bug found in Edit rule at "Source" when selecting anything before "Single Host."
Post by: mrzaz on October 03, 2026, 12:47:49 PM
Quote from: bamf on Today at 12:16:56 PMThis is not a bug. Create an Alias if you want to combine entries.

After doing some more testing I found that:

if you do it Predefined and then Input it remove predefined.

If you do Input first and then select Predefined it shows like both is selected, but this only until press apply/save. Then it only save the last one selected.

So the confusion was that I was able to selected 2 at first (like multiselect) but later was reverted to only last selected threw me a curveball.

So we could revert this topic from bug to rather an opinion about function.

It would have been easier if I select something and later click on something else in the drop down it should auto deselect the previous entry so when closing the dropdown (before apply/save)
there should only be one entry = the last thing selected and not as today that you find it after you pressed save.

Best regards
Dan Lundqvist
Stockholm, Sweden