Bug in wireguard configurations parsing

Started by meyergru, January 29, 2025, 02:49:42 PM

Previous topic - Next topic
I saw this error in my wireguard log after upgrading to 25.1:

2024-11-02T12:41:43 Error wireguard /usr/local/opnsense/scripts/Wireguard/wg-service-control.php: The command '/usr/bin/wg syncconf 'wg0' '/usr/local/etc/wireguard/wg0.conf'' returned exit code '1', the output was 'Name does not resolve: `xxx.yyy.de:6010' Configuration parsing error'

The corresponding line in the "Peer" section of /usr/local/etc/wireguard/wg0.conf is:

Endpoint = xxx.yyy.de:6010

This configuration has not been hand-edited, it was created via the web UI.
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 450 up, Bufferbloat A+

It means the DNS lookup failed at the time syncconf was executed.  It's not really a syntax error, just a fatal error trying to convert DNS to IP because most of those DNS-in-the-system things are only ever resolved once and then static IP addresses for the rest of their lifetime.


Cheers,
Franco
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT

Ah, correct. It only looks as if it was the port...
Intel N100, 4* I226-V, 2* 82559, 16 GByte, 500 GByte NVME, ZTE F6005

1100 down / 450 up, Bufferbloat A+