Project

General

Profile

Bug #11288

Wireguard: Peer PSK is auto-filled to the keepalive field

Added by Steve Wheeler 3 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
WireGuard
Target version:
Start date:
01/22/2021
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.5.0
Affected Architecture:
All
Release Notes:
Default

Description

If you configure a PSK on a WireGuard peer and then edit that peer the keep-alive field will be populated by the PSK value.

Updating that peer and saving obviously produces a non loadable conf file:

 Jan 22 15:14:33     php-fpm     26466     /vpn_wg_edit.php: The command '/usr/local/bin/wg setconf 'wg0' '/etc/wg/wg0.conf'' returned exit code '1', the output was 'Persistent keepalive interval is neither 0/off nor 1-65535: `gzU4Ry5WXrqPhdFR8YsFg5z/PrnbxDwZLrbh7aK7Xow=' Configuration parsing error' 

Tested:

21.02-DEVELOPMENT (amd64)
built on Thu Jan 21 00:08:27 EST 2021
FreeBSD 12.2-STABLE

Associated revisions

Revision 262dba24 (diff)
Added by Jim Pingle 3 months ago

Fix populating keepalive value. Fixes #11288

Revision 9f127e7e (diff)
Added by Jim Pingle 3 months ago

Fix WG Keep Alive field variable name. Fixes #11288

History

#2 Updated by Jim Pingle 3 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#3 Updated by Viktor Gurov 3 months ago

  • Status changed from Feedback to Resolved

2.5.0.a.20210122.2350 fixed

#4 Updated by Christian McDonald 3 months ago

I'm still having issues with the Keepalive field. When I edit and peer and set the keepalive value, save and come back the field is blank. The value is also not present in 'wg showconf' at the shell.

#5 Updated by Jim Pingle 3 months ago

  • Status changed from Resolved to Feedback

I found a typo in the variable name used to populate the value in the GUI, but the backend appears to be using it appropriately. Commit coming momentarily.

I'm not sure if wg is supposed to print that value or not, but it does appear in the configuration in /etc/wg/

#6 Updated by Christian McDonald 3 months ago

Excellent, will test! Thanks

#7 Updated by Christian McDonald 3 months ago

tested on gitsync yesterday and today via normal snapshot upgrade, both look good here.

#8 Updated by Jim Pingle 3 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF