Bug? Changing wan dhcp to static causes this error
-
Hmm, can I assume you added a static gateway on the WAN when you switched?
-
@stephenw10 Correct.
Change from dhcp to static then enter ip/subnet. Click add gateway and enter gw ip details, save. Save in the main edit interface page, then apply.
-
Why did you change to static? Were you assigned a static address by your ISP? If not, you shouldn't be doing that.
-
@JKnott That's beside the point :). I was testing something. The concern is the error message in the log.
-
Replicated that. It's config access bug. The result of extensive changes in how the config is accessed in 24.11.
https://redmine.pfsense.org/issues/16105
Interesting side note is that the system doesn't allow you to set the gateway to the same IP passed by DHCP...
-
@stephenw10 You are correct. I forgot about that. In testing, I incremented the last octet by 1, then corrected it after applying via system/routing/gateways.
A bit of the horse fighting the buggy scenario?
-
Yes, it's probably safer to refuse duplicate gateways than to try and allow for dhcp to static transitions when it's relatively easy to work past. If annoying!
-
@stephenw10 Is this patch supposed to work on 24.11 or only on 25.03? Even with the patch applied I was still seeing the same error in 24.11 and 25.03. I tested several variations including 24.11 with the patch, 24.11 without the patch upgraded to 25.03 then patch applied.
Testing consists of toggling between static and dhcp wan settings. It's important to delete the newly created gateway (under system/routing) after switching back to dhcp. Next time when setting it back to static, the bug would get triggered.
<confused>
-
Try the additional commit shown.
-
@stephenw10 Success. I only tested as far as error messages in the logs.
It should be noted both earlier and later patches need to be applied in order. I was initially under the understanding the later just needs to be applied by itself.
-
8286c27ca678dbada2d205f606e76fab48885f60
-
f51505bf15e7af39c909d63356089d5e247cf781
-