Wireguard and "route -n monitor"

Colleagues, please tell me why Wireguard launches the "route -n monitor" program after bringing up the interface?
And most importantly, if it can't live without it, why doesn't it kill it after stopping the interface?
And why is it that if I bring up the same interface again, it starts up another instance of that monitor, even though the previous one is alive and running? Can't it create a pid file?

What is the correct way to behave in such a situation?

I appreciate your advice,
Ogogon.
 

FreeBSD test 14.1-STABLE FreeBSD 14.1-STABLE n230739-60392563451 GENERIC amd64


I applied this patch but nothing changed.
I haven't test the patch yet but did you first kill "route -n monitor" and "/usr/local/bin/bash /usr/local/bin/wg-quick up wg0" processes and then start and stop wireguard to see if it works?
 
I'll confirm that this problem still exists on 14.2p1.

It is more interesting than it seems. Every time you 'service wireguard stop' and 'service wireguard start' it invokes another instance of both wg-quick up wg0 and the route -n monitor. If you stop/start 10 times you then have 10 instances of both running. It seems that only the most recent instance is meaningful as I killed the 9 previous instances and WG still seemed to work.

Once I simply stopped WG with the service call, then killed the lingering wg and route instances but that screwed up the routing for other things. Restarting WG solved that problem.

So far, this is just a nuisance but clearly one that ought to be corrected.
 
Back
Top