WireGuard / wireguard-vyatta-ubnt

WireGuard for Ubiquiti Devices
https://www.wireguard.com/
GNU General Public License v3.0
1.46k stars 68 forks source link

Defining fwmark breaks wireguard config #77

Closed mvn23 closed 3 years ago

mvn23 commented 3 years ago

Since my weekly auto-update this morning, I noticed wireguard was not working anymore on my ER4 v1.10.11. When checking the web interface, there were no wireguard interfaces present and the wireguard branch in the config tree was empty. The related parts were still present in config.boot, so I tried a reboot without success. I made a backup of my config.boot and decided to try and recreate the wireguard config. All went fine until I wanted to commit the changes. The UI complained about No such device when setting the fwmark. I restored my backup of config.boot and removed the fwmark lines from the config. Now after a reboot everything is fine again, but when I set the fwmark option again it only works until the next reboot.

Steps to reproduce:

FossoresLP commented 3 years ago

@whiskerz007 Could this be an issue with the commit order with the new scripts? It seems like fwmark is applied before the interface is created, causing an error.

whiskerz007 commented 3 years ago

@FossoresLP fwmark does not have a priority set. Would you like me to create a PR, or do you want to handle it?

whiskerz007 commented 3 years ago

Setting fwmark priority to 460 seems to resolve the problem.

FossoresLP commented 3 years ago

Would be great if you could open a PR. Thanks a lot for figuring all these issues out.