fff-vxlan-node-vpn: fix frequent restarts of vxlan

The vxlan interface is restarted every time vpn-select is run. But it is only needed when the hoodfile changes.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Robert Langhammer 2022-03-04 23:09:05 +01:00
parent 4f92c7345b
commit 82e8b24945
1 changed files with 3 additions and 2 deletions

View File

@ -16,8 +16,9 @@ vxlan_addpeer() {
vxlan_start_stop() {
uci commit network
# reload_config will not add new peers. A ifup is needed
ifup vxlan0
reload_config
# reload_config will not add new peers. A ifup is needed if there is a new hoodfile.
[ "$new_hoodfile" = "yes" ] && ifup vxlan0
# this workaround is cleaning up old fdb entries
# and can be removed if someday netifd will do that