[FS#4102] netifd intermittently fails to bring up wireguard interface

OpenWrt Bugs openwrt-bugs at lists.openwrt.org
Thu Oct 21 06:50:31 PDT 2021


A new Flyspray task has been opened.  Details are below. 

User who did this - Robert (wiltedwalls) 

Attached to Project - OpenWrt/LEDE Project
Summary - netifd intermittently fails to bring up wireguard interface
Task Type - Bug Report
Category - Base system
Status - Unconfirmed
Assigned To - 
Operating System - All
Severity - High
Priority - Very Low
Reported Version - openwrt-21.02
Due in Version - Undecided
Due Date - Undecided
Details - I have a wireguard interface that is defined in UCI, which normally works well.  Sometimes following a device reboot, wireguard will not be brought up at all.  When I then try to bring up the interface manually using "ifup wg0", the wireguard.sh setup code is not even called.  Rebooting the router beings back normal wireguard functionality.

I have seen this on 21.02 (ramips & ath79), 21.02-rc3 (ramips), and 19.07.3 (ar71xx).

It happens most frequently following an automatic 3am reboot.  It is difficult to reproduce on demand in the middle of the day.  I can cause it to happen in about 20% of 3am reboots by using a domain name for the wireguard peer which is a CNAME pointing to a CNAME pointing to a CNAME pointing to an A record.

@vgaetera thinks there might be a race condition in netifd, which is why I have tagged this report.

I have several routers in this state presently and can do any requested testing on them.

Other people are also seeing the same issue.  One person reports seeing the issue also when using an ip address for the peer (no DNS).  A link to the forum discussion is https://forum.openwrt.org/t/wireguard-interfaces-sometimes-do-not-come-up-automatically-in-21-02/106012

More information can be found at the following URL:

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.

More information about the openwrt-bugs mailing list