From now on, /etc/uci-defaults is my mortal enemy
So, what's the problem? Just snapshot the settings of a freshly factory-reset router, and then diff your changes against that.
Well, say hi to /etc/uci-defaults
It's a directory any package can put scripts in
And each of those scripts will run on every boot (and possibly also on other occasions) and try to set some uci settings. Until it succeeds, then that script won't run again.
If you're lucky, it will only set the defaults in the file in /etc/config that belongs to the package it's from
But in most cases, that package won't have its own config, and the script will set things in another package's config - /etc/config/network, or system, or luci, etc.
So if you ask "what is the default /etc/config/network", there isn't a single answer. The defaults can change every time you install a package.
On the plus side, I learnt one way how not to design a config system for a router xD
So it seems OpenWrt config should be easy to version-control, right?
Just
ssh myrouter uci export > myrouter.conf
git add myrouter.conf
...except it contains the defaults. Explicitly set, indistinguishable for something manually changed.
And if I ever want to port my config to a newer OpenWrt version, or a different router with a different set of packages installed, I need to know which settings I changed on purpose, and which are just the defaults.