Use common function to toggle ip address in /var/state/mwan3.
Change also to use toggle function and not set function. If ip address
is often changed every change is saved to /var/state/mwan3.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
Add new globals config section with option local_source.
With this config option the self interface generation will be done now
automatically on hotplug event. You can specify which interface (ip)
sould be used for router traffic. To replace the self intereface in the
config set local_source to "lan".
The default option is none, so it will not change default behavior if a
"self" interface is configured in the network section.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>