* security/tinc: Allow empty subnet for switch mode
A Host class with empty self._payload['subnet'] is considered invalid (lines 38-39). Thus, we can remove self._payload['subnet'] = None from __init__() and add a check for existance to config_text().
* security/tinc: Allow empty subnet for switch mode
Set network.subnet.required and host.subnet.required to N, add a required constraint for network.subnet if network.mode is router.
* security/tinc: Trigger configctl on tinc-up
In order to support various dual-stack configs (primary IPv4/v6 assigned by VPN/Tinc and any combination of alias IPv4/v6 assigned by Firewall/VIP) we need to trigger configctl:
- Primary IPv4: /usr/local/opnsense/service/configd_ctl.py interface newip $interface
- Primary IPv6: /usr/local/opnsense/service/configd_ctl.py interface newipv6 $interface
* security/tinc: Destroy tun/tap interface on stop
Destroying tun/tap interface each time Tinc daemon stops/restarts resolves the issue of losing IPv6 network routes (see #3972).
* security/Tinc: Add a missing reference constraint
The network.mode field is now linked to the network.subnet field.
* security/Tinc: Refactor tincd.py
While 'forward-ssl-upstream' is indeed an alias/alternative syntax for the '*tls*' option, therefore it's more a cosmetic thing - specially because it's called DNS over TLS. Just to be consistent with terms used.
It may be obvious to some, but I think there's some value in making it more explicit that the password required here is for the *remote* shadowsocks server. Furthermore, I would suggest moving the password in the form closer to the remove server info.
Find mac addresses case-insensitive. When mac addresses are added, they are saved like the users enters them. If the user used upper-case letters, this results in showing the host offline in the dashboard, although it´s online. Other fix would be to make all mac inputs lowercase while saving.
The idea was to have a shared default.mk between both repositories,
but for the time being this has an issue with the different prefixes
used by core.git and plugins.git, namely CORE_ and PLUGIN_.